[wp-trac] [WordPress Trac] #43605: Add HTTP/1.0 emulation to apiRequest()

WordPress Trac noreply at wordpress.org
Thu Oct 1 17:57:47 UTC 2020


#43605: Add HTTP/1.0 emulation to apiRequest()
----------------------------+-----------------------
 Reporter:  pento           |       Owner:  (none)
     Type:  enhancement     |      Status:  assigned
 Priority:  normal          |   Milestone:  5.6
Component:  REST API        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  good-first-bug  |     Focuses:  rest-api
----------------------------+-----------------------
Changes (by TimothyBlynJacobs):

 * keywords:   => good-first-bug


Comment:

 Ok, thanks @earnjam!

 Adding the `good-first-bug` keyword.

 The fix here is if the passed method is `POST`, `PUT`, or `DELETE` to pass
 that in the `X-HTTP-Method-Override` header. We then change the `method`
 to `POST`.

 https://github.com/WordPress/wordpress-
 develop/blob/150d9bd17e99857cf24fa6f0139b2e76ba6761ad/src/js/_enqueues/wp
 /api-request.js#L57

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


More information about the wp-trac mailing list