Select to view content in your preferred language

GeoProcessor Task Execute Get or Post? With proxy.ashx?

794
2
01-25-2012 08:54 AM
DaveHighness
Deactivated User
I need to be able to execute geoprocessor tasks to the Rest API with more data than will fit in a GET request. It appears to me that the ArcServer Javascript API uses GET to send the requests to a GPServer no matter if I use proxy.ashx or not. Is this correct? To get around this I wrote a POST based caller with ExtJs that works well. But, now I need this to work on cross domain basis and I have not figured out how to do this with my ExtJs method. I would go back to the Javascript API Execute method if I could get it to use POST. Any ideas?

Thanks, Dave
0 Kudos
2 Replies
JeffPace
MVP Alum
I need to be able to execute geoprocessor tasks to the Rest API with more data than will fit in a GET request. It appears to me that the ArcServer Javascript API uses GET to send the requests to a GPServer no matter if I use proxy.ashx or not. Is this correct? To get around this I wrote a POST based caller with ExtJs that works well. But, now I need this to work on cross domain basis and I have not figured out how to do this with my ExtJs method. I would go back to the Javascript API Execute method if I could get it to use POST. Any ideas?

Thanks, Dave


if you use esri.request it will automatically switch between get and post as needed.  you could also explicitly use dojo.xhrGET or dojo.xhrPOST.  However, which execute method are you using that is trying to execute a GET with >2000 characters? that should not happen
0 Kudos
DaveHighness
Deactivated User
Jeff, I'll test that out again. I could swear it didn't work when I tried it last but I may be mistaken. I made a mistake in my first post too because this is an asyncronous service so we are using submitJob rather than execute.

If the Javascript API isn't working I'll look into the Dojo method.

Thanks, Dave
0 Kudos