Skip to content

Commit

Permalink
send data in body, except get request
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Hryn authored and MykolaiKorniat committed Jul 12, 2019
1 parent b8bba9d commit fba9191
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea/
vendor/
composer.lock
2 changes: 1 addition & 1 deletion lib/Gitlab/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fba9191

Please sign in to comment.