diff --git a/src/Http/GuzzleHttp.php b/src/Http/GuzzleHttp.php index 2d6e7df..9fde4c7 100644 --- a/src/Http/GuzzleHttp.php +++ b/src/Http/GuzzleHttp.php @@ -62,7 +62,10 @@ public function request(Request $request, $timeout = 30) break; case Request::METHOD_PUT: case Request::METHOD_POST: - $hasParam AND $options['json'] = $params; + if ($hasParam) { + $options['headers']['Content-Type'] = 'application/json'; + $options['body'] = json_encode($params, JSON_UNESCAPED_SLASHES); + } break; default: $exception = new HttpException('Unsupported method ' . $method, 0);