Questions tagged [codeigniter-restserver]

A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.

A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.

Dowloads :

REST SERVER

REST CLIENT

Tutorials

http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/

98 questions
2
votes
1 answer

RestServer in Codeigniter: 401 Unauthorized response when loading in view

I'm using the restserver in Codeigniter from Chris Kacerguis and I setup rest_auth with session. When I'm logged in, I access the page whose view.php get the response through file_get_contents and it's returning 401 Unauthorized. When I access the…
2
votes
1 answer

How to integrate instamojo payment gateway with codeigniter rest server?

I am trying to integrate Instamojo Payment Gateway within Chris Kacerguis’ REST Server. Problem: The below code: public function instamojotest_post() { $api = new Instamojo\Instamojo(‘abcd1234’, ‘efgh5678’,…
2
votes
3 answers

How to show form validation message for particular field in codeigniter

Here I want to show validation message for different fields $this->form_validation->set_rules('email','Email','trim|required|valid_email'); $this->form_validation->set_rules('password', 'Password', 'required'); if…
G.Ashok Kumar
  • 1,649
  • 2
  • 13
  • 25
2
votes
3 answers

Angular 2 Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response

I'm using codeigniter REST API for my server application. And client as Angular2, in my REST API I have given basic auth. I have set like $config['rest_auth'] = 'basic'; And $config['rest_valid_logins'] = ['uname' => 'pwd']; And also for CORS…
2
votes
1 answer

REST User registration and Login through Api Key

I am not new to codeignitor , but still i didn't used they feature called 'API keys' authentication. What i want to do ? Register a user in my_users table and there is apikey as column that should store and generate unique api while user…
Zulqurnain Jutt
  • 1,083
  • 3
  • 15
  • 41
2
votes
2 answers

Codeigniter RESTServer session

I'm building an API with CodeIgniter and the RestServer implementation from https://github.com/chriskacerguis/codeigniter-restserver I want to use the 'session' authentication mode so I set this in config/rest.php: $config['rest_auth'] =…
NVO
  • 2,566
  • 5
  • 27
  • 57
2
votes
1 answer

Invalid API key as a reponse of PUT method using RESTServer codeigniter

I am using the codeigniter rest server api library. When I enter http://localhost/RESTapi/api/question?X-API-KEY=XXX in Postman with the PUT method I'm getting: { "status": false, "error": "Invalid API key " } It works fine with GET method How…
Mraimou
  • 175
  • 3
  • 13
2
votes
1 answer

How to get/set Header in Rest Server API?

i have a chriskacerguis Rest Server ,that listen for a client request as usually an API Server do. base on client request i want to send/response some data to client in header only. my questions are: how do i access Client header first? then how…
Abdul Manan
  • 2,255
  • 3
  • 27
  • 51
2
votes
2 answers

how to add a location header to http response from codeigniter rest server

I have a codeigniter rest api, created using this library: https://github.com/chriskacerguis/codeigniter-restserver For my POST method, once the resource has been successfully created, I would like to include a location header that includes a URI…
dot
  • 14,928
  • 41
  • 110
  • 218
2
votes
1 answer

Breaking json object with large data in HTTP GET

I have an application built with Angularjs and CodeIgnitor. The angularjs sets $scope data using $resource service get methods in startup using ng-init. Its working fine with less data but the application fails with large count of data. Is there…
Anshad Vattapoyil
  • 23,145
  • 18
  • 84
  • 132
1
vote
1 answer

Extends REST_Controller and MY_Controller at once in CodeIgniter

I have this situation where I need to access a global function and normally I will do that in MY_Controller for the normal CodeIgniter. But in this case, I am using a REST server and I noticed that the normal controller must extends REST_Controller…
Emerald
  • 864
  • 1
  • 14
  • 37
1
vote
0 answers

Codeiniter Rest Server - Not able to get data sent via post request

I am creating a simple rest API in Codeigniter using the chriskacerguis/codeigniter-restserver.I have successfully created a login method and tested it using the postman and it works but i have created a simple login page to consume the API using…
Ropali Munshi
  • 2,757
  • 4
  • 22
  • 45
1
vote
1 answer

$this->input->post() returns NULL in codeigniter rest api implementation

In the file RestClient.php the lines $uname = $this->input->post('username') and $pwd = $this->input->post('password') returns NULL. This is my (View) loginform.php
1
vote
3 answers

405 method not allowed - CodeIgniter Rest-server

I am having troubles with Codeigniter - Rest Server for a week already. I have a controller called Users with 2 methods all_users_get and register_post. all_users_get is working fine. register_post returns { "status": false, "error": "Unknown…
1
vote
0 answers

Always getting "status":false while using rest api in codeigniter 2.0

I am using Ashimante Rest Server API in my project. This is what I did:- I have put the Rest.php controller in the application/libraries folder I have created webservice-v1 folder inside the application/controllers/ folder i.e.…
Saswat
  • 12,320
  • 16
  • 77
  • 156