Select to view content in your preferred language

Using Post Method in QueryTask

1973
4
03-18-2013 11:40 PM
mehmetyildiz
Deactivated User
Hi,
i am developping a basic application in javascript. In my application i am using querytask. But problem is that my whereclause is too big. for example whereclause is like id in (id1,id2,id3,......,...,id200). So when i trying to query with this wherelcause even the request doesnt start. I searched on internet a little bit and everybody says that i need to use post method in my requests. But how can i use post methods. or if you know another solutions could you help me please?

Best Regards
mayildiz
0 Kudos
4 Replies
JohnGravois
Deactivated User
its not necessary to declare something explicitly in code to ensure that a POST is used for a request, the API does this automatically when appropriate.

the caveat is that posting across domains requires a proxy (unless both the browser and web server support CORS).

do you have a valid proxy referenced in your application?
0 Kudos
mehmetyildiz
Deactivated User
Thanx jgravois for your reply;

Soo i need to use proxy. But i want to ask a question. Proxy is only needed for security isn't it? I mean if my request is included too large query strings is that a security problem? Also want to ask that if i want to use proxy do i need to some changes on my mapservers or feature servers.
Best Regards
0 Kudos
JohnGravois
Deactivated User
in Flex and Silverlight, a proxy is only useful for working with secure services.  in JavaScript it is also necessary if you'd like to POST across domains.  no need to change anything in your map services.  just check out the conceptual article about proxies that i linked to previously.
0 Kudos
mehmetyildiz
Deactivated User
Thanx you jgravois for your answer. i should prapare a proxy page :). i got it.
0 Kudos