daviddesberg / PHPoAuthLib

PHP 5.3+ oAuth 1/2 Client Library
Other
1.08k stars 454 forks source link

Reciving the HTTP status code of the response? #539

Closed RobinBertilsson closed 1 year ago

RobinBertilsson commented 6 years ago

So, lets say you're creating a request whatever domain you'd like. You probably doing something like $response = $service->request('endpoint', 'GET').

But the $response variable will ONLY contain the body of the response. We're having a senario where the provider returns a 401, can clearly see it in CurlClient.php@126, but since retrieveResponse() only returning curl_exec($ch) it's pretty hard to solve.

Whats the thoughts here?

germanow commented 3 years ago

I found this PR https://github.com/Lusitanian/PHPoAuthLib/pull/236 , but it wasn't accepted.