[wp-trac] [WordPress Trac] #49252: REST API response not valid for null on 5.3.2

WordPress Trac noreply at wordpress.org
Mon Feb 24 19:20:42 UTC 2020


#49252: REST API response not valid for null on 5.3.2
-------------------------------------+------------------------------
 Reporter:  jankadlec                |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  REST API                 |     Version:  5.3
 Severity:  normal                   |  Resolution:
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+------------------------------

Comment (by jankadlec):

 Hi @TimothyBlynJacobs


 The purpose of a GET method is to retrieve a resource. So, while allowed,
 an HTTP 204 is no the best choice since content IS expected in the
 response.

 The RFC also specifically calls out an HTTP 204 as an appropriate response
 for PUT, POST and DELETE, but omits it for GET.

 see https://tools.ietf.org/html/rfc2616#section-9.3

 Best Regards

 Jan

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49252#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list