Questions tagged [codeigniter-restapi]
9 questions
3
votes
0 answers
Codeigniter Version 4.1.7 Rest API Routing Post method not working
I am using Codeigniter Version 4.1.7.
Where I am implementing Rest API.
In the routes the GET method works,however Post method is not working.
I am testing this using POSTMAN.
URL : http://localhost/myproject/api/add-user
Following is the…

Ruprit
- 733
- 1
- 6
- 23
2
votes
1 answer
php - Codeigniter Rest api simple CRUD
I have this problem with inserting data to MySQL which require POST method by using postman.
this function data_post() inserts data from database, but when I am trying to insert data raw data with postman…

Arwin Chua
- 73
- 2
- 7
1
vote
1 answer
Codeigniter 4 Shield: How to issue an access token
I'm starting to work with Codeigniter 4 Shield.
I added this piece of code to my app/Config/Routes.php file.
$routes->get('/access/token', static function() {
$token =…

luis
- 11
- 3
1
vote
2 answers
Consume a REST API in codeigniter controller
I have create a REST API and want to consume my own created API in codeigniter controller.
My created REST API
controller(example.php)
class Example extends REST_Controller {
public function __construct() {
parent::__construct(); …

dipti
- 154
- 6
- 17
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
0
votes
1 answer
Handling REST API server response
I've been working with REST API CodeIgniter for more than a year and usually when I want to return any response I will return 200 for all kind of request. I know that there are status code provided for all response but I am actually quite wondering,…

Leon
- 329
- 2
- 3
- 15
0
votes
1 answer
How to fix java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ with correct JSON form
I have this code in my Activity :
package com.salammedindonesia.ptsalammeddeviceindonesia.activities;
import android.Manifest;
import android.app.ProgressDialog;
import android.content.ActivityNotFoundException;
import…

Muhammad Abraham Alkindy
- 21
- 1
- 5
0
votes
1 answer
Phonegap Error : 401 Unauthorized - consuming Rest API with Basic Auth in Phonegap
I have create rest api in codeigniter and trying to consume it in phonegap app But its giving me Error - 401 Unauthorized in Phonegap index.html page.
I am using Token Based Authentication in codeigniter. Rest api is working fine in postman and also…

Heemanshu Bhalla
- 3,603
- 1
- 27
- 53
0
votes
1 answer
Codeigniter API Get Call With Param Options For WHERE Mysql Query PHP
I am using CodeIgniter to build my api and I am trying to find the best way to allow multiple params to be sent to then run my Model where clause if they exist. I am running into some problem and would appreciate if someone could pass on some advise…

user1503606
- 3,872
- 13
- 44
- 78