Saturday, May 19, 2012

How to post json content?

Hi,
I want to us the RequestBuilder to post a json request. What is the best way to do this? What content-type should be used? How do I encode the content? Can I send the content with the request body?
The content type "url-form-encoded" is not quite right, because I have a deeply nested java script object, and not a list of key-value pairs. On the other hand the content type "application/json"  doesn't indicate any encoding. But without being url-encoded the json-content gets ruined, when containing special characters and being send in the request header.
Gregor 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/T3EdNVWvMIEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate