I'm not quite sure what you mean by sending an array to httpservice. If you want to send an array to httpservice with the same field name, you can pass the array as the field value.
var service:HTTPService = new HTTPService();
service.useProxy = true;
service.destination = "myservicet";
service.resultFormat = HTTPService.RESULT_FORMAT_XML;
var fields:Array = ["categories", "organisation"];
var params:Object = new Object();
params.q = "stackoverflow";
params.rows = 0;
params.facet = "true";
params["facet.field"] = fields;
service.send(params);
HTTPService converts this to URL parameters:
facet = true & q = stackoverflow & facet% 2Efield = categories & facet% 2Efield = organization & rows = 0
Hope this helps!
Added for clarity. When there is only 1 argument in an array, do not pass the fields as an array. For some reason, flex won't send this to the http service
source
share