Browse Source

decode response in json by default

main
ghost 1 year ago
parent
commit
11c397b566
  1. 4
      src/library/curl.php

4
src/library/curl.php

@ -89,8 +89,8 @@ class Curl @@ -89,8 +89,8 @@ class Curl
return curl_getinfo($this->_connection, CURLINFO_TOTAL_TIME_T);
}
public function getResponse()
public function getResponse(bool $json = true)
{
return $this->_response;
return $json ? json_decode($this->_response) : $this->_response;
}
}
Loading…
Cancel
Save