diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php
index b9f5ab5..094c328 100644
a
|
b
|
class WP_Http { |
135 | 135 | * @type string sslcertificates Absolute path to an SSL certificate .crt file. |
136 | 136 | * Default ABSPATH . WPINC . '/certificates/ca-bundle.crt'. |
137 | 137 | * @type bool $stream Whether to stream to a file. If set to true and no filename was |
138 | | * given, it will be droped it in the WP temp dir and its name will |
139 | | * be set using the basename of the URL. Default false. |
| 138 | * given, the stream will be output to a new file in the WP temp dir |
| 139 | * using a name generated from the basename of the URL. Default false. |
140 | 140 | * @type string $filename Filename of the file to write to when streaming. $stream must be |
141 | 141 | * set to true. Default null. |
142 | 142 | * @type int $limit_response_size Size in bytes to limit the response to. Default null. |
| 143 | * @type bool|null $data_format How the `$data` should be sent ('query' or 'body'). Default null. |
| 144 | * If null, data will be sent as 'query' for HEAD/GET and as |
| 145 | * 'body' for POST/PUT/OPTIONS/PATCH/DELETE. |
143 | 146 | * |
144 | 147 | * } |
145 | 148 | * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. |
… |
… |
class WP_Http { |
202 | 205 | 'stream' => false, |
203 | 206 | 'filename' => null, |
204 | 207 | 'limit_response_size' => null, |
| 208 | 'data_format' => null, |
205 | 209 | ); |
206 | 210 | |
207 | 211 | // Pre-parse for the HEAD checks. |
… |
… |
class WP_Http { |
333 | 337 | $options['verify'] = $r['sslcertificates']; |
334 | 338 | } |
335 | 339 | |
336 | | // All non-GET/HEAD requests should put the arguments in the form body. |
337 | | if ( 'HEAD' !== $type && 'GET' !== $type ) { |
| 340 | if ( null !== $r['data_format'] ) { |
| 341 | $options['data_format'] = $r['data_format']; |
| 342 | |
| 343 | } elseif ( 'HEAD' !== $type && 'GET' !== $type ) { |
| 344 | // All non-GET/HEAD requests should put the arguments in the form body. |
338 | 345 | $options['data_format'] = 'body'; |
339 | 346 | } |
340 | 347 | |