[Zope3-Users] Accessing raw post data
Adam GROSZER
agroszer at gmail.com
Thu Jul 22 05:02:16 EDT 2010
Hello Edoardo,
You might be interested in z3c.json, z3c.jsonrpc.
Especially z3c.jsonrpc, that should handle such requests with ease.
Wednesday, July 21, 2010, 7:33:29 PM, you wrote:
ES> Hi guys,
ES> I need to access the body of an HTTP POST request.
ES> The request has content type of 'application/json' and the body is a JSON-encoded string.
ES> I tried to access the bodyStream attribute of the BrowserRequest object but it always returns an
ES> empty string.
ES> I used a network analyzer to see the content of the HTTP Request which follows:
ES> POST /facebook-realtime-callback.html HTTP/1.1
ES> Host: www.satisfly.com
ES> Accept: */*
ES> Content-Type: application/json
ES> X-Hub-Signature: sha1=d2a5fd64c731bfdc50578db1a297b195853b5bac
ES> Content-Length: 173
ES> {"object":"user","entry":[{"uid":"100001314277196","changed_fields":["picture"],"time":1279728528},{"uid":"100001314277196","changed_fields":["picture"],"time":1279728528}]}
ES> I'm using Zope 3.3.1 on debian etch
ES> Your help would be really appreciated
ES> Regards,
ES> Edoardo Serra
ES> SATISFLY Limited
ES> 66/F The Center
ES> 99 Queen's Road Central
ES> Hong Kong
ES> http://www.satisfly.com/airline
ES> _______________________________________________
ES> Zope3-users mailing list
ES> Zope3-users at zope.org
ES> https://mail.zope.org/mailman/listinfo/zope3-users
--
Best regards,
Adam GROSZER mailto:agroszer at gmail.com
--
Quote of the day:
Nothing ever built arose to touch the skies unless some man dreamed that it should, some man believed that it could, and some man willed that it must.
- Charles F. Kettering
More information about the Zope3-users
mailing list