CodeIgniter Forums
Phils RESTClient and HTTP codes. Please help! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Phils RESTClient and HTTP codes. Please help! (/showthread.php?tid=32848)



Phils RESTClient and HTTP codes. Please help! - El Forum - 08-06-2010

[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!


Phils RESTClient and HTTP codes. Please help! - El Forum - 07-26-2011

[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 !