restful-services-in-codeigniter | Create RESTful webservices using Codeigniter | REST library
kandi X-RAY | restful-services-in-codeigniter Summary
kandi X-RAY | restful-services-in-codeigniter Summary
Create RESTful webservices using Codeigniter
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of restful-services-in-codeigniter
restful-services-in-codeigniter Key Features
restful-services-in-codeigniter Examples and Code Snippets
Community Discussions
Trending Discussions on restful-services-in-codeigniter
QUESTION
I am trying to integrate RESTful services to my Codeigniter application. I am using this library https://github.com/chriskacerguis/codeigniter-restserver and the tutorial from https://code.tutsplus.com/tutorials/working-with-restful-services-in-codeigniter--net-8814.
However, I am a little confused about how to implement routing. The tutorial mentions using the full url but I'd like to do something like:
My Controller
class AdminLogin_WS extends REST_Controller {
...ANSWER
Answered 2017-Jul-15 at 16:53Updated with information from chat
Using login_get()
and login_post()
and then making the POST request to AdminLogin_WS/login
was the correct thing to do, and the login_post()
was getting called, there was just some confusion because the POST was returning the same response as the GET using the code that the poster was using.
Original answer
I would post this as a comment but don't have the rep to do so.
What do you mean by "It only works if I create a controller function called login_get()
"? That sounds to me like you're sending in a GET rather than a POST to your route. Can you give some information on how you're testing to see if you can POST and get to your login_post()
? Have you tried downloading a tool like Postman (https://www.getpostman.com/) and sending in a POST to help eliminate the possibility that you're not sending in the POST correctly?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install restful-services-in-codeigniter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page