[wp-trac] [WordPress Trac] #39453: WP REST API Response Media Type

WordPress Trac noreply at wordpress.org
Tue Jan 3 19:33:06 UTC 2017


#39453: WP REST API Response Media Type
--------------------------+-----------------------------
 Reporter:  schlessera    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
--------------------------+-----------------------------
 The WP REST API responses in JSON format are sent using the media type
 `application/json`.

 However, the API documentation states that it complies to the HAL spec.
 The HAL spec defines a separate media type, which is identified as
 `application/hal+json`.

 So, if the WP REST API does indeed use the HAL media type as its response
 format, it should also use the corresponding identifier.

 Note: I assume that it is too late at this point to change the response
 media type. However, the reasons for keeping the "incorrect" media type
 should be recorded in a ticket for posteriority.

 Link to HAL spec: https://tools.ietf.org/html/draft-kelly-json-hal-07

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39453>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list