Welcome Guest, Not a member yet? Register   Sign In
Restfull or Curl services for codeigniter
#1

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?
Reply
#2

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

http://docs.guzzlephp.org/en/latest/
Reply
#3

this codeigniter rest library is actively maintained. https://github.com/chriskacerguis/codeig...restserver
Reply
#4

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

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....oducts/get it would work but thats not the point using REST services.

Any help will be much appreciated.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB