Hi,
I have an app set up using Backbone.js and Tornado. One of the
Backbone models is making a POST request to a handler (when saving)
and passing along Payload Data;
Request URL:
http://localhost:8888/message
Request Method:POST
Status Code:200 OK
Request Headers
POST /message HTTP/1.1
Host: localhost:8888
Connection: keep-alive
Content-Length: 68
Cache-Control: no-cache
Origin:
http://localhost:8888
X-Requested-With: XMLHttpRequest
Pragma: no-cache
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/
535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Type: application/json
Accept: application/json, text/javascript, */*; q=0.01
Referer:
http://localhost:8888/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: msg_error=SW5jb3JyZWN0IHBhc3N3b3Jk|1328223024|
f6b00f25d745537771171528df659d5ab6752def; user_id="Mg==|1328223162|
5d71ccc88136f86ec5434957515189bc80850cd9"; username="a2V2aW4=|
1328223162|cda11d83c9269fbb8e6f74c88245432a46262630"
Request Payload
{"text":"foobar","date":"2012-02-05T11:23:46.105Z","author":"Kevin"}
Response Headers
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Server: TornadoServer/2.2
AllDocumentsStylesheetsImagesScriptsXHRFontsWebSocketsOther
I'm trying to access the variables text, date and author from the
Request Payload section. the get_argument method of the Request
Handler returns empty values when trying to access anything from the
payload e.g. self.get_argument('text', None) // => None
How can I access the Request Payload?