I’m writing a rest service which accepts json documents with http post.
I can submit my data using my “Chrome Rest Console” plugin by putting a JSON document into the raw body field.
I’m trying to achieve the same using urllib2.
Using urllib2 i’m not able to post data unless I urlencode one or more key/value pairs which correspond to the cgi form fields of the web service.
However, I don’t want to make use of cgi form fields, as my rest service doesn’t have any,
I just want to submit a raw json document …
How can I do that?
Thanks,
J
I’m not flagging the question as exact duplicate as I’m not sure this is what you meant. However from this other question: