<p>Ruby on Rails controllers will automatically convert parameters to an array if they have a specific format, like so:</p>

<pre><code>http://foo.com?x[]=1&amp;x[]=5&amp;x[]=bar
</code></pre>

<p>This would get converted into the following array:</p>

<pre><code>['1','5','bar']
</code></pre>

<p>Is there any way I can do this with an ActionScript 3 HTTPService object, by using the request parameter?  For example, It would be nice to do something like the following:</p>

<pre><code>var s:HTTPService = new HTTPService();
s.request['x[]'] = 1;
s.request['x[]'] = 5;
s.request['x[]'] = 'bar';
</code></pre>

<p>However, that will simply overwrite each value, resulting in only the last value being sent.  Anyone have a better idea?  I know I could just append stuff to the query string, but I'd like to do it in the POST body.</p>

I usually do something like this...
```
```
var s:HTTPService = new HTTPService();
s.url = "http://foo.com";
s.method = "post";
// add listeners...
s.addEventListenser(ResultEvent.RESULT,function(event:ResultEvent){

    mx.controls.Alert.show(event.result.toString());
});

// send the data...
s.send({
    a: 1,
    b: 5,
    c: "bar"
});
```
```
which would result in the HTTP Get / POST of:
http://foo.com?a=1&b=5&c=bar
You could also just create an associative array and pass it to the HTTPService send method, that would be something like:
```
```
var postdata:Object = {};

postdata["a"] = 1;
postdata["b"] = 5;
postdata["c"] = "bar";

// s is the HTTPService from above...
s.send(postdata);
```
```