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
0
Issue boards
Milestones
Code
Merge requests
0
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-http-client
Commits
325d37f9
Commit
325d37f9
authored
5 years ago
by
Marcin Kolanko
Browse files
Options
Downloads
Patches
Plain Diff
fixed namespace
parent
4cc774d9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
fixed namespace
Pipeline
#5175
passed with stages
in 3 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Curl/CurlClient.php
+5
-5
5 additions, 5 deletions
src/Curl/CurlClient.php
with
5 additions
and
5 deletions
src/Curl/CurlClient.php
+
5
−
5
View file @
325d37f9
...
...
@@ -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
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment