From fba91914c1755d09237079a21901fb90ee33a5c3 Mon Sep 17 00:00:00 2001 From: Viktor Hryn Date: Fri, 12 Jul 2019 09:15:09 +0300 Subject: [PATCH] send data in body, except get request --- .gitignore | 1 + lib/Gitlab/HttpClient/HttpClient.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d1502b087..cbf3ce61a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/.idea/ vendor/ composer.lock diff --git a/lib/Gitlab/HttpClient/HttpClient.php b/lib/Gitlab/HttpClient/HttpClient.php index 6b786227b..8a3508372 100644 --- a/lib/Gitlab/HttpClient/HttpClient.php +++ b/lib/Gitlab/HttpClient/HttpClient.php @@ -214,7 +214,7 @@ public function getLastResponse() */ private function createRequest($httpMethod, $url, array $parameters, array $headers, array $files) { - if (empty($files)) { + if ($httpMethod === 'GET') { $request = new Request($httpMethod); $request->setContent(http_build_query($parameters)); } else {