Test run for Curl URL Requests
This commit is contained in:
1 parent
50a4b88f55
commit
3c5200cd99
3 files changed
+9
-4
No files matched your search
@@ -139,9 +139,7 @@ class Curl implements Interface\RequestsInterface
|
||||
// init curl handle
|
||||
$handle = $this->handleCurleInit($url);
|
||||
// set the standard curl options
|
||||
if ($headers !== []) {
|
||||
$this->setCurlOptions($handle, $headers);
|
||||
}
|
||||
$this->setCurlOptions($handle, $headers);
|
||||
// for post we set POST option
|
||||
if ($type == "post") {
|
||||
curl_setopt($handle, CURLOPT_POST, true);
|
||||
@@ -205,7 +203,9 @@ class Curl implements Interface\RequestsInterface
|
||||
if (!empty($this->auth_ident)) {
|
||||
curl_setopt($handle, CURLOPT_USERPWD, $this->auth_ident);
|
||||
}
|
||||
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
|
||||
if ($headers !== []) {
|
||||
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
|
||||
}
|
||||
// curl_setopt($handle, CURLOPT_FAILONERROR, true);
|
||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||
// for debug only
|
||||
|
||||
Reference in new issue
Block a user