Skip to content

Commit

Permalink
Fixed Guzzle post/put field aggregation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Swientek committed Jan 14, 2014
1 parent af53fd5 commit d3a0d6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion src/Mailgun/Connection/RestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
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;
Expand Down Expand Up @@ -63,7 +64,8 @@ public function post($endpointUrl, $postData = array(), $files = array()){
}
}
}


$request->getPostFields()->setAggregator(new DuplicateAggregator());
$response = $request->send();
return $this->responseHandler($response);
}
Expand All @@ -87,6 +89,7 @@ public function delete($endpointUrl){

public function put($endpointUrl, $putData){
$request = $this->mgClient->put($endpointUrl, array(), $putData);
$request->getPostFields()->setAggregator(new DuplicateAggregator());
$response = $request->send();
return $this->responseHandler($response);
}
Expand Down

0 comments on commit d3a0d6a

Please sign in to comment.