[wp-trac] [WordPress Trac] #39150: Empty JSON Payload Causes rest_invalid_json
WordPress Trac
noreply at wordpress.org
Wed Dec 7 21:46:17 UTC 2016
#39150: Empty JSON Payload Causes rest_invalid_json
--------------------------+------------------------------
Reporter: GamerZ | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by jnylen0):
Hi @GamerZ, thanks for reporting this. @peterigz seems to have reported
the same issue in #39166.
From the
[https://github.com/WordPress/WordPress/blob/721cf281a35788edbb4c762d42e62a61c37372b5
/wp-includes/rest-api/class-wp-rest-request.php#L648-L670 relevant code]
it looks like this only happens if you send `Content-Type:
application/json`. Is it an option for either of you to omit this header
from your requests?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39150#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list