Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Nov 28, 2024
1 parent 0c7b5a9 commit 061ff54
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function execute($requestMethod, $url, $parameters = null, $extraOptions
'Accept: application/json;charset=UTF-8',
);

$s = microtime(true);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

Expand Down Expand Up @@ -103,6 +104,11 @@ public function execute($requestMethod, $url, $parameters = null, $extraOptions
$info['errno'] = curl_errno($curl);
$info['error'] = curl_error($curl);

print_r([
[$requestMethod, $url, $parameters, $extraOptions],
[$info, $rawResult, microtime(true) - $s],
]);

if (array_key_exists(CURLOPT_FAILONERROR, $extraOptions) &&
$extraOptions[CURLOPT_FAILONERROR] &&
CURLE_GOT_NOTHING !== ($errno = curl_errno($curl)) &&
Expand Down

0 comments on commit 061ff54

Please sign in to comment.