1.0.0 Alpha Release #59
1 changed files with 13 additions and 0 deletions
|
@ -64,6 +64,12 @@
|
||||||
if (count($httpRequest->Headers) > 0)
|
if (count($httpRequest->Headers) > 0)
|
||||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $httpRequest->Headers);
|
curl_setopt($curl, CURLOPT_HTTPHEADER, $httpRequest->Headers);
|
||||||
|
|
||||||
|
Console::outDebug(sprintf(' => %s request %s', $httpRequest->Type, $httpRequest->Url));
|
||||||
|
if($httpRequest->Headers !== null && count($httpRequest->Headers) > 0)
|
||||||
|
Console::outDebug(sprintf(' => headers: %s', implode(', ', $httpRequest->Headers)));
|
||||||
|
if($httpRequest->Body !== null)
|
||||||
|
Console::outDebug(sprintf(' => body: %s', $httpRequest->Body));
|
||||||
|
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
|
|
||||||
if ($response === false)
|
if ($response === false)
|
||||||
|
@ -82,6 +88,13 @@
|
||||||
$httpResponse->Headers = self::parseHeaders($headers);
|
$httpResponse->Headers = self::parseHeaders($headers);
|
||||||
$httpResponse->Body = $body;
|
$httpResponse->Body = $body;
|
||||||
|
|
||||||
|
Console::outDebug(sprintf(' <= %s response', $httpResponse->StatusCode));/** @noinspection PhpConditionAlreadyCheckedInspection */
|
||||||
|
if($httpResponse->Headers !== null && count($httpResponse->Headers) > 0)
|
||||||
|
Console::outDebug(sprintf(' <= headers: %s', implode(', ', $httpResponse->Headers)));
|
||||||
|
/** @noinspection PhpConditionAlreadyCheckedInspection */
|
||||||
|
if($httpResponse->Body !== null)
|
||||||
|
Console::outDebug(sprintf(' <= body: %s', $httpResponse->Body));
|
||||||
|
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
|
|
||||||
return $httpResponse;
|
return $httpResponse;
|
||||||
|
|
Loading…
Add table
Reference in a new issue