Skip to content

Add documentation for POST raw JSON data #2396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Add documentation for POST raw JSON data #2396

wants to merge 1 commit into from

Conversation

tvlooy
Copy link
Contributor

@tvlooy tvlooy commented Mar 30, 2013

Add documentation for POST raw JSON data

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed tickets #2368

@wouterj
Copy link
Member

wouterj commented Mar 30, 2013

👍 our first hackday PR!

Can you please add the pull request format

@@ -343,6 +343,9 @@ or perform more complex requests::
// Directly submit a form (but using the Crawler is easier!)
$client->request('POST', '/submit', array('name' => 'Fabien'));

// Submit a raw JSON string
$client->request('POST', '/submit', array(), array(), array(), '{"title":"Hello World!"');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add the closing curly brace to send a valid JSON string.

And you should probably add the header for the content type too.

@weaverryan
Copy link
Member

Hi Tom!

Looks awesome! I've patched this into the 2.0 branch at sha: 1bc1540

Thanks!

@weaverryan weaverryan closed this Mar 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants