Skip to content

Commit

Permalink
Fixed wrong function names for setting serialize_payload_method
Browse files Browse the repository at this point in the history
'neverSerializePayload' and 'smartSerializePayload' were using an inexistent function called 'serializePayload'.
  • Loading branch information
zupolgec committed Sep 7, 2012
1 parent d2a24f8 commit 65ffd72
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/Httpful/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,14 @@ public function withStrictSSL()
* @return Request $this
* @param int $mode
*/
public function alwaysSerializePayload($mode = self::SERIALIZE_PAYLOAD_ALWAYS)
public function serializePayload($mode)
{
$this->serialize_payload_method = $mode;
return $this;
}

/**
* @see Request::alwaysSerializePayload()
* @see Request::serializePayload()
* @return Request
*/
public function neverSerializePayload()
Expand All @@ -395,13 +395,22 @@ public function neverSerializePayload()

/**
* This method is the default behavior
* @see Request::alwaysSerializePayload()
* @see Request::serializePayload()
* @return Request
*/
public function smartSerializePayload()
{
return $this->serializePayload(self::SERIALIZE_PAYLOAD_SMART);
}

/**
* @see Request::serializePayload()
* @return Request
*/
public function alwaysSerializePayload()
{
return $this->serializePayload(self::SERIALIZE_PAYLOAD_ALWAYS);
}

/**
* Add an additional header to the request
Expand Down

0 comments on commit 65ffd72

Please sign in to comment.