GET vs POST when using Query

4879
1
05-25-2011 06:56 PM
ryanmordoff
New Contributor II
I'm trying to do a query off of a geometry buffer, but it is creating a url that is too long (creating an error when it tries to fire).  I know that in the javascript api you would use a proxy to help with this, but when reading the docs for flex it states you don't need one.  You could just use a POST instead of a GET:

[INDENT]Note: for a JavaScript application, a proxy page is also required when the requests exceed the limit on the length of URLs imposed by the browser. This does not apply to Flex API applications as the Adobe Flash Player can "POST" requests when needed.[/INDENT]

Is there a simple way to make a query POST with the api, or do I need to use the Flex HTTPService?

Thanks,
Ryan
Tags (2)
0 Kudos
1 Reply
BjornSvensson
Esri Regular Contributor
Is there a simple way to make a query POST with the api, or do I need to use the Flex HTTPService?


The Flex API will automatically use POST when needed. You don't have to do anything.

"... will always POST if the URL is longer than 2000 characters or includes a "token" parameter, but using this [the method] property you can force a "POST" even for all other cases."
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/tasks/BaseTask.html#method
0 Kudos