diff --git a/restclient.php b/restclient.php index 2d55d5e..38eb92a 100755 --- a/restclient.php +++ b/restclient.php @@ -208,6 +208,7 @@ public function execute(string $url, string $method='GET', $parameters=[], array $client->error = curl_error($client->handle); curl_close($client->handle); + return $client; } @@ -241,6 +242,7 @@ public function parse_response($response) : void { $this->headers = (object) $headers; $this->response = strtok(""); + strtok("", ""); // Clean strtok buffer from memory } public function get_response_format() : string {