Select to view content in your preferred language

Proxy Page or SOE for lengthy GET Requests

2206
3
05-20-2013 12:46 PM
LeoDonahue
Deactivated User
I realize this question could go in either the server forums or here based on the responses.  Since a SOE would require ArcObjects, I posted here.

For those of you who are working in Server, are you using the proxy page to handle your GET requests that exceed the GET request URL limit or are you developing SOE's to address that kind of special request?

For example, why open your entire REST endpoint to potential abuse (if not securing the web application) for a simple buffer request that may exceed the GET request URL length limitation by deploying the proxy page?  One could just as easily move those kinds of requests to the server and let a SOE handle returning a json to the browser for putting up the buffer graphic in the map. No?
0 Kudos
3 Replies
RichardWatson
Deactivated User
We use Silverlight and have a class which encapsulates all of our HTTP logic.  That class has logic in it which changes GET requests to POST requests in order to work around this issue.
0 Kudos
LeoDonahue
Deactivated User
Yes, Silverlight and Flex have that nice option.  Both of which are supposedly going the way of the dinosaur?

JavaScript API folks don't have that option. Unless I am missing something.
0 Kudos
RichardWatson
Deactivated User
JavaScript certainly is not the language l know best.  That said, I hope that the following information is helpful.

Here is some ESRI documentation on esri.Request which appears to be the recommended mechanism used to perform HTTP requests:

http://developers.arcgis.com/en/javascript/jshelp/inside_esri_request.html

Scroll down to "Under the Hood: Determining Which Dojo Method is Used" and you will find the following:

JSON / XML / plain text: If JSON / XML / PlainText request
  If target not on same domain && CORS not available
    Rewrite request url to use proxy
  If request size is 2000 characters or less
    Call dojo.xhrGet
  Else
    Call dojo.xhrPost
0 Kudos