Skip to content

Commit

Permalink
Update RequestBody.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone authored Feb 21, 2017
1 parent f09a332 commit 78932aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/RequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ public function __construct($contents, $encoding = '8bit')
{
case 'integer':
case 'double':
fwrite($this->h, (string)$contents);
$str = (string)$contents;
break;

case 'string':
fwrite($this->h, $contents);
$str = $contents;
break;

case 'object':
case 'array':
fwrite($this->h, json_encode($contents));
$str = json_encode(json_encode($contents);
break;

case 'boolean':
fwrite($this->h, $contents ? 'true' : 'false');
$str = $contents ? 'true' : 'false';
break;
}

Expand Down Expand Up @@ -289,4 +289,4 @@ public function getMetadata($key = null)

return null;
}
}
}

0 comments on commit 78932aa

Please sign in to comment.