urlUtils.addProxyRule doesn't permit POST requests

3118
1
01-08-2014 06:16 AM
deleted-user-pYdfRjvSAbTJ
New Contributor III
I'm using urlUtils.addProxyRule for a service and I cannot understand why every request is a GET request.
the problem is that if I try to use a QueryTask using a large polygon as param, it doesn't send a POST request, but it tries to send a GET request: obviously the length of the URL is more than 2000 chars and it doesn't work (the polygon has a large number of vertexes in its ring).
it seems that using urlUtils.addProxyRule the API doesn't recognize that if the request params are too large, it has to use a POST request and not another GET.
0 Kudos
1 Reply
JohnGravois
Frequent Contributor
i adapted this sample to use urlUtils.addProxyRule() and didn't have any trouble POSTing the circle geometry to query for points.

//esriConfig.defaults.io.proxyUrl = "/proxy/";        
urlUtils.addProxyRule({
  urlPrefix: "sampleserver1.arcgisonline.com",  
  proxyUrl: "/proxy/"
});


[ATTACH=CONFIG]30410[/ATTACH]
can you provide your own simplified sample demonstrating the problem?
0 Kudos