CodeIgniter Forums

Full Version: Phils RESTClient and HTTP codes. Please help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]murphy2006[/eluser]
Hello,

I am using Phils RestClient to communicate with a REST-api.
How can I check what http code that the API sends back? For example 200 or 500?
I got the REST call in a model.

In short, how can I get http code and "transfer" it from the model to the controller?

Thankful for all help!

El Forum

[eluser]Madoc[/eluser]
Apologies to bump up an old thread but I could find the answer to this question.

Is there a way to retrieve the http headers (or at least the http status codes) from Phil Sturgeon's REST client ?

I am new at this put looking at it, it looks like only the resource is available from the REST class methods (get, post, ...).

Many thanks !