mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update docs to X-POST_DATA_MARSHAL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1306 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
cada2c71d3
commit
68cdcf5ed3
1 changed files with 4 additions and 4 deletions
|
@ -1,13 +1,13 @@
|
|||
*SVN*
|
||||
|
||||
* Added support for POST data in form of YAML or XML, which is controller through the POST_DATA_MARSHAL header. Example request:
|
||||
* Added support for POST data in form of YAML or XML, which is controller through the X-POST_DATA_MARSHAL header. Example request:
|
||||
|
||||
POST_DATA_MARSHAL: xml
|
||||
X-POST_DATA_MARSHAL: xml
|
||||
<request><item><content>HelloWorld</content></item></request>
|
||||
|
||||
...is the same as:
|
||||
|
||||
POST_DATA_MARSHAL: yaml
|
||||
X-POST_DATA_MARSHAL: yaml
|
||||
---
|
||||
item:
|
||||
content: HelloWorld
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
Example Curl call:
|
||||
|
||||
curl -H 'POST_DATA_MARSHAL: xml' -d '<request><item><content>KillMeMore</content></item></request>' http://www.example.com/service
|
||||
curl -H 'X-POST_DATA_MARSHAL: xml' -d '<request><item><content>KillMeMore</content></item></request>' http://www.example.com/service
|
||||
|
||||
You can query to find out whether a given request came through as one of these types with:
|
||||
- request.post_format? (:query_string, :xml or :yaml)
|
||||
|
|
Loading…
Reference in a new issue