Update docs to X-POST_DATA_MARSHAL

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1306 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 cada2c71
*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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册