We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f9be2c commit 1bc1540Copy full SHA for 1bc1540
book/testing.rst
@@ -344,6 +344,16 @@ or perform more complex requests::
344
// Directly submit a form (but using the Crawler is easier!)
345
$client->request('POST', '/submit', array('name' => 'Fabien'));
346
347
+ // Submit a raw JSON string
348
+ $client->request(
349
+ 'POST',
350
+ '/submit',
351
+ array(),
352
353
+ array('CONTENT_TYPE' => 'application/json'),
354
+ '{"name":"Fabien"}'
355
+ );
356
+
357
// Form submission with a file upload
358
use Symfony\Component\HttpFoundation\File\UploadedFile;
359
0 commit comments