I'm using an API using a POST request and Zend_Http_Client.
I need the query string to emulate a get request that would look like ?id=5&id=10&fileName=Sample-Document
. As you can see, there are two id parameters. Is there a way to do this using Zend_Http_Client and a $_POST request?
This is my code thusfar:
$client = new Zend_Http_Client();
.
..
... $client->config stuff goes here
..
.
$data = array('id'=>array('5', '10')), 'fileName'=>'Sample-Document');
$client->setParameterPost($data['fileName'], 'fileName');
// theoretically, i'd like to do it like this, but it doesn't work since i think the second line overwrites the first
$client->setParameterPost('id', ($data['id'][0]);
$client->setParameterPost('id', $data['id'][1]);
$client->request('POST');