Skip to content

Commit

Permalink
Mime type param on Request::body no longer sets expects
Browse files Browse the repository at this point in the history
As pointed out in Issue #119, setting expects here may produce unexpected results.
  • Loading branch information
Nathan committed May 21, 2014
1 parent c430e7c commit 8c6ee14
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Httpful/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,11 @@ public function authenticateWithCert($cert, $key, $passphrase = null, $encoding
* Set the body of the request
* @return Request this
* @param mixed $payload
* @param string $mimeType currently, sets the sends AND expects mime type although this
* behavior may change in the next minor release (as it is a potential breaking change).
* @param string $mimeType sets the content type for the request (no longer additionally sets "expects")
*/
public function body($payload, $mimeType = null)
{
$this->mime($mimeType);
$this->contentType($mimeType);
$this->payload = $payload;
// Iserntentially don't call _serializePayload yet. Wait until
// we actually send off the request to convert payload to string.
Expand Down

0 comments on commit 8c6ee14

Please sign in to comment.