1

I am trying to work with a simple HTTPService. The problem is that my webservice is conscious of the order of arguments it gets. I will tell the problem with an example:

var service:HTTPService = new HTTPService(); 
var params:Object = new Object(); 
params.rows = 0;
params.facet = "true"; 
service.send(params); 

Note that in the above code I have mentioned the parameter rows before facet, but the url I recieve is facet=true&rows=0. So I recieve the argument rows before facet and hence my webservice does not work. I figured out that the contents of array is always sent in alphabetical order, which I dont want.

Is there any way I can achieve explict ordering of parameters sent?

Note that I am not in power of changing the logic of webservice(its basically a RPC service supporting both desktop and web client).

Thanks.

1 Answer 1

2

I am assuming you are using a get method. Instead of passing params to the HTTPService, build a url string. You can pass get params just by changing that string then calling the service.

service.url = "originalURL" + "?" + "rows=0" + "&" + "facet=true";
service.send();
Sign up to request clarification or add additional context in comments.

1 Comment

i knew this already...but was wondering there was a more flexible way of doing it instead of hardcoding the url. As of now, I thin kI have to stick with this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.