Skip to content

Commit

Permalink
make sure the rawBody data is a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
N1ghteyes committed Oct 17, 2018
1 parent a073a91 commit eafa5e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apicore/structure/response.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public static function verbUsed($verb){
public static function processResult($guzzleResponse){
self::$response->dataType = array_shift($guzzleResponse->getHeader('Content-Type'));
self::$response->statusCode = $guzzleResponse->getStatusCode();
self::$response->rawBodyData = $guzzleResponse->getBody();
self::$response->url = $guzzleResponse->getHeaderLine('X-GUZZLE-EFFECTIVE-URL');
self::$response->rawBodyData = (string)$guzzleResponse->getBody();
self::$response->url = $guzzleResponse->getHeaderLine('Location');

switch(self::$response->dataType){
case 'application/json':
Expand Down

0 comments on commit eafa5e1

Please sign in to comment.