CodeIgniter Forums
Restfull or Curl services for codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Restfull or Curl services for codeigniter (/showthread.php?tid=1485)



Restfull or Curl services for codeigniter - comp_nerd26 - 03-13-2015

will the new release of codeigniter intergrate restful or Curl services? many other mvc frameworks already have this yet seems to be lacking in codeigniter which for me is a real shame?


RE: Restfull or Curl services for codeigniter - cwells - 03-13-2015

Why not just use Guzzle? I have it working with CI 3 RC3.

http://docs.guzzlephp.org/en/latest/


RE: Restfull or Curl services for codeigniter - cartalot - 03-16-2015

this codeigniter rest library is actively maintained. https://github.com/chriskacerguis/codeigniter-restserver


RE: Restfull or Curl services for codeigniter - ciadmin - 03-16-2015

You can now use HTTP verbs in routing, which would make it easier to built a RESTful service Smile


RE: Restfull or Curl services for codeigniter - diegopego86 - 04-08-2015

I'm trying to use the HTTP verbs but it doesn´t seems to be working:

I have:

$route['products']['GET'] = 'products/get';
$route['products']['POST'] = 'products/create';
$route['products/(:num)']['PUT'] = 'products/update/$1';
$route['products/(:num)']['DELETE'] = 'pedids/delete/$1';

And then using a HTTP request using Angular I can´t get any data back. I tried with POST, PUT and DELETE method and still the same. Can anyone tell me what am I doing wrong?

I also tried to use curl -X GET http://localhost/codeigniter3test/index.php/products and I got a 404 error. But if I access the actual method curl -X GET http://localhost/codeigniter3test/index.php/products/get it would work but thats not the point using REST services.

Any help will be much appreciated.