Webservice API |
Hi!
A couple of years ago i wrote a webservice using "SLIM"...worked pretty good. Very fast. But i had to do alot of coding. So i am about to do a new webservice. And i love CodeIgniter. Have been using this framework for different projects (backend). So i though i would like to use CI to do a webservice. So i found this: https://github.com/chriskacerguis/codeig...restserver And it looked great at first glance. But then is see it doesn´t support multiple resources in a URI. For example: A guy owns alot of cars. You want to see all the cars owned by this guy. The RESTful way would be a URI that looks like this: GET users/12/cars (fetches userid=12 all cars) I could solve this by: GET users/12 And then with userdata also include all cars. But that´s "bloating"...if i only need user info...no cars should be included in the response. however....codeigniter restserver seems to ONLY handle in this URI format: Controller/Resource/Param/Format In my opinion that is not really doing a very good RESTful job. Are there any other CI based webserive frameworks?
I don't know another implementation. But before abandoning your initial test see what configuration could be done within config/routes.php for modeling your links. There are discussions on StackOverflow as I can see. It is a matter of minor additional configuration.
(03-13-2018, 09:35 AM)ivantcholakov Wrote: I don't know another implementation. But before abandoning your initial test see what configuration could be done within config/routes.php for modeling your links. There are discussions on StackOverflow as I can see. It is a matter of minor additional configuration. Yeah, i´m not really sure what to do here :-) Read some "StackOverflow" posts but it seemed liked no solutions was found except "bloating". I could do that...but with a couple of thousands of API calls that will be costly. I am thinking of going once again with SLIM framework for the API...but i will also develop a website that can talkt to the API and that will be CodeIgniter. |
Welcome Guest, Not a member yet? Register Sign In |