POST a json object to REST API

Discussion created by gsimpson4 on Aug 1, 2013
Has anyone been able to successfully do this?  I have a c# object representing a Query that I want to submit to the REST API.  I have serialized the object into a string and posted the string but get errors.  The only solution I've found is to basically convert the string to a querystring and post that.

Basically, the object:

{f:"json", geometry:{xmin:0,ymin:0,xmax:100,ymax:100},geometryType:"esriGeometryEnvelope"}

has to be posted as:


instead of the actual JSON string.