File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -235,17 +235,19 @@ document::
235
235
)
236
236
237
237
The ``server `` array is the raw values that you'd expect to normally
238
- find in the PHP `$_SERVER `_ superglobal. For example, to set the `Content-Type `
239
- and `Referer ` HTTP headers, you'd pass the following::
238
+ find in the PHP `$_SERVER `_ superglobal. For example, to set the `Content-Type `,
239
+ `Referer ` and `X-Requested-With' HTTP headers, you'd pass the following (mind
240
+ the `HTTP_` prefix for non standard headers)::
240
241
241
242
$client->request(
242
243
'GET',
243
244
'/demo/hello/Fabien',
244
245
array(),
245
246
array(),
246
247
array(
247
- 'CONTENT_TYPE' => 'application/json',
248
- 'HTTP_REFERER' => '/foo/bar',
248
+ 'CONTENT_TYPE' => 'application/json',
249
+ 'HTTP_REFERER' => '/foo/bar',
250
+ 'HTTP_X-Requested-With' => 'XMLHttpRequest',
249
251
)
250
252
);
251
253
You can’t perform that action at this time.
0 commit comments