From 9a495c8ebe24594edff0a012e380d07a341539cd Mon Sep 17 00:00:00 2001 From: Steeve Andrian Salim Date: Thu, 19 Jul 2018 13:06:45 +0700 Subject: [PATCH] curl response bug fixes --- src/Request.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Request.php b/src/Request.php index 96c41f1..85713f1 100644 --- a/src/Request.php +++ b/src/Request.php @@ -578,7 +578,11 @@ public function get(array $query = []) */ public function getResponse() { - $handle = curl_init($this->uri->__toString()); + if(array_key_exists(CURLOPT_URL, $this->curlOptions)) { + $handle = curl_init(); + } else { + $handle = curl_init($this->uri->__toString()); + } $headers = []; if (count($this->curlHeaders)) {