From 8c6ee14de84faab98bc066bcf46b9fc4359a10d2 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 21 May 2014 06:23:19 -0400 Subject: [PATCH] Mime type param on Request::body no longer sets expects As pointed out in Issue #119, setting expects here may produce unexpected results. --- src/Httpful/Request.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Httpful/Request.php b/src/Httpful/Request.php index 01ec112..087a49a 100755 --- a/src/Httpful/Request.php +++ b/src/Httpful/Request.php @@ -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.