[wp-trac] [WordPress Trac] #34841: Support for registering HEAD callback in REST API

WordPress Trac noreply at wordpress.org
Mon Jan 18 06:49:06 UTC 2016


#34841: Support for registering HEAD callback in REST API
-----------------------------------+-----------------------
 Reporter:  danielbachhuber        |       Owner:  rmccue
     Type:  enhancement            |      Status:  accepted
 Priority:  normal                 |   Milestone:  4.5
Component:  REST API               |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+-----------------------
Changes (by rmccue):

 * keywords:  needs-patch => has-patch 2nd-opinion
 * owner:   => rmccue
 * status:  new => accepted
 * milestone:  Future Release => 4.5


Comment:

 Added patch; this requires registering the `HEAD` endpoint before the
 `GET` one. Essentially internally we're now treating `GET` as `GET,HEAD`,
 so this matches the behaviour of first-match we currently have (that is,
 if you have two endpoints with `POST,PUT` and `POST` respectively, a
 `POST` will match the first one).

 @danielbachhuber @joehoyle @rachelbaker :thumbsup: on the approach? We'll
 need to make sure it's documented that `GET` is treated as `GET,HEAD`.

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


More information about the wp-trac mailing list