Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-http-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-http-client
Merge requests
!5
fixed namespace
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
fixed namespace
devel
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Krzysztof Dyszczyk
requested to merge
devel
into
master
5 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
325d37f9
1 commit,
5 years ago
1 file
+
5
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Curl/CurlClient.php
+
5
−
5
View file @ 325d37f9
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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
);
}
/**
Loading