Skip to content

Added example of non standard 'X-Requested-With' HTTP header. #1946

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

Merged
merged 2 commits into from
Nov 23, 2012

Conversation

tPl0ch
Copy link

@tPl0ch tPl0ch commented Nov 21, 2012

This example is giving an example on how to add a non standard header, and as well reminding the user to add a 'HTTP_' prefix, so the custom header gets sent when doing the request.

This example is giving an example on how to add a non standard header,
and as well reminding the user to add a 'HTTP_' prefix, so the custom
header gets sent.
'HTTP_REFERER' => '/foo/bar',
'CONTENT_TYPE' => 'application/json',
'HTTP_REFERER' => '/foo/bar',
'HTTP_X-Requested-With' => 'XMLHttpRequest'
Copy link
Member

Choose a reason for hiding this comment

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

there should be a comma after each array item.

@tPl0ch
Copy link
Author

tPl0ch commented Nov 21, 2012

@wouterj Sorry, must have missed that in the guidelines. It's my first PR on the symfony docs so be patient with me :-)

@wouterj
Copy link
Member

wouterj commented Nov 21, 2012

@tPl0ch don't worry, we check every PR because almost all PR's contains errors. You can find the standards here: http://symfony.com/doc/current/contributing/documentation/overview.html#standards

weaverryan added a commit that referenced this pull request Nov 23, 2012
Added example of non standard 'X-Requested-With' HTTP header.
@weaverryan weaverryan merged commit aaaafa9 into symfony:2.0 Nov 23, 2012
@weaverryan
Copy link
Member

Hey Thomas!

Very nice PR. Technically if you're using the BrowserKit alone, then this is not true (it only applies if you're using the Client from HttpKernel, which extends the BrowserKit's Client). But, since this is about the framework, you're 100% correct and this is a great note.

Thanks!

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.

3 participants