From ca70dd44d4e4abb46f1593aa799c000bfd09adbe Mon Sep 17 00:00:00 2001 From: Sebastian Pisula <sebastian.pisula@gmail.com> Date: Wed, 9 Dec 2020 16:35:36 +0100 Subject: [PATCH] bugfix(core): Fixing body issue --- changelog.txt | 5 ++++- src/Curl/CurlClient.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 86036ef..bac951e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ += 1.0.4 - 2020-12-09 = +* Fixed issue with body + = 1.0.3 - 2020-04-10 = -* Increased Curl connection timeout +* Increased Curl connection timeout = 1.0.2 - 2019-12-06 = * Fixed issue with headers diff --git a/src/Curl/CurlClient.php b/src/Curl/CurlClient.php index 503b317..ace0598 100644 --- a/src/Curl/CurlClient.php +++ b/src/Curl/CurlClient.php @@ -91,7 +91,7 @@ class CurlClient implements HttpClient { return $len; } ]; - if ( $method !== "GET" ) { + if ( ! empty( $body ) ) { $options[ \CURLOPT_POSTFIELDS ] = $body; } \curl_setopt_array( $this->curlResource, $options ); -- GitLab