[wp-trac] [WordPress Trac] #37364: PHP Warning caused by \WP_Http::request, when body contains a JSON string

WordPress Trac noreply at wordpress.org
Mon Jul 18 15:27:27 UTC 2016


#37364: PHP Warning caused by \WP_Http::request, when body contains a JSON string
--------------------------+--------------------
 Reporter:  sciamannikoo  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.6
Component:  HTTP API      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------

Comment (by ocean90):

 This seems to depend on the `data_format` option which is set
 [https://github.com/rmccue/Requests/blob/ae16e797f7dcc4439e540939d5bb31f920e5e87f/library/Requests.php#L604-L611
 here] and used in cURL
 [https://github.com/rmccue/Requests/blob/125746209802f03316a3ee2d872df19044735a13/library/Requests/Transport/cURL.php#L320-L328
 here].

 @sciamannikoo: I'm actually not sure why `body` is set in your GET
 example, shouldn't this be a POST request?

 @rmccue: Any thoughts on the different types? Looks like
 https://github.com/rmccue/Requests/blob/ae16e797f7dcc4439e540939d5bb31f920e5e87f/library/Requests.php#L557
 supports a string too.

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


More information about the wp-trac mailing list