Fixed Guzzle post/put field aggregation.

This commit is contained in:
Travis Swientek 2014-01-14 00:43:29 +00:00
parent af53fd50ff
commit d3a0d6aed9
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,9 @@
Enhancement:
- adjust file attachment/inline name (#21 @travelton)
Bugfixes:
- fixed issue with unordered route actions (#23 @travelton)
## 1.5 (2013-12-13)
Enhancement:

View File

@ -6,6 +6,7 @@ use Guzzle\Http\Client as Guzzle;
use Mailgun\MailgunClient;
use Mailgun\Connection\Exceptions\GenericHTTPError;
use Guzzle\Http\QueryAggregator\DuplicateAggregator;
use Mailgun\Connection\Exceptions\InvalidCredentials;
use Mailgun\Connection\Exceptions\NoDomainsConfigured;
use Mailgun\Connection\Exceptions\MissingRequiredParameters;
@ -63,7 +64,8 @@ class RestClient{
}
}
}
$request->getPostFields()->setAggregator(new DuplicateAggregator());
$response = $request->send();
return $this->responseHandler($response);
}
@ -87,6 +89,7 @@ class RestClient{
public function put($endpointUrl, $putData){
$request = $this->mgClient->put($endpointUrl, array(), $putData);
$request->getPostFields()->setAggregator(new DuplicateAggregator());
$response = $request->send();
return $this->responseHandler($response);
}