Skip to content
Snippets Groups Projects
Commit 737ce4c8 authored by Marcin Kolanko's avatar Marcin Kolanko
Browse files

Merge branch 'devel' into 'master'

fixed namespace

See merge request !5
parents feb0cc98 325d37f9
No related branches found
No related tags found
1 merge request!5fixed namespace
Pipeline #5207 failed with stages
in 4 minutes and 15 seconds
......@@ -50,10 +50,10 @@ class CurlClient implements HttpClient {
return $this->prepareResponse();
} catch ( \Exception $e ) {
$this->closeConnection();
if ( $e instanceof \WPDesk\HttpClient\HttpClientRequestException ) {
if ( $e instanceof HttpClientRequestException ) {
throw $e;
}
throw \WPDesk\HttpClient\Curl\CurlExceptionFactory::createDefaultException( $e->getMessage(), $e->getCode(), $e );
throw CurlExceptionFactory::createDefaultException( $e->getMessage(), $e->getCode(), $e );
}
}
......@@ -132,7 +132,7 @@ class CurlClient implements HttpClient {
return;
}
$errorMessage = \curl_error( $this->curlResource );
throw \WPDesk\HttpClient\Curl\CurlExceptionFactory::createCurlException( $errorMessage, $errorNumber );
throw CurlExceptionFactory::createCurlException( $errorMessage, $errorNumber );
}
/**
......@@ -146,7 +146,7 @@ class CurlClient implements HttpClient {
private function prepareResponse() {
list( $rawHeaders, $rawBody ) = $this->extractResponseHeadersAndBody();
return new \WPDesk\HttpClient\HttpClientResponse( $rawHeaders, $rawBody, $this->httpResponseCode );
return new HttpClientResponse( $rawHeaders, $rawBody, $this->httpResponseCode );
}
/**
......@@ -199,4 +199,4 @@ class CurlClient implements HttpClient {
public function put( $url, $body, array $headers, $timeOut ) {
return $this->send( $url, 'PUT', $body, $headers, $timeOut );
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment