Welcome Guest, Not a member yet? Register   Sign In
Consume API externally
#3

(This post was last modified: 10-05-2021, 01:52 PM by RRIOS.)

(10-04-2021, 04:23 PM)includebeer Wrote: You can't test a POST request by typing its url in the browser. This will send a GET request. Use something like Postman if you want to test your API with the right HTTP method.

Hi. Thanks for replying. OK understood.
Maybe I haven't explained it in detail:
I have several CRUD and Querys in a Single Page Application ( codeigniter 3 )
I have some App Android, that use PHP scripts (not inside the Codeigniter structure -others scripts) for query, insert, update and delete.
The app sends the POST or Get and the PHP script returns Json and in the App I handle this return.
Now, I need that, using a crud codeigniter 4 + api (simple queries to 1 table), through these same App, I can do this query and return Json to the App.
I access the method I created with the name show and 1 parameter. But the return is : error 404 + the message I customized. This message is shown in the IF ; after querying the database passing the parameter ID .
The parameter, gets to the show method inside "Vercli" controller as null (I think)
My Codeigniter 4 and Controller Environment , now they are still on localhost.
Reply


Messages In This Thread
Consume API externally - by RRIOS - 09-28-2021, 05:51 AM
RE: Consume API externally - by includebeer - 10-04-2021, 04:23 PM
RE: Consume API externally - by RRIOS - 10-05-2021, 01:34 PM
RE: Consume API externally - by includebeer - 10-05-2021, 02:54 PM
RE: Consume API externally - by RRIOS - 10-05-2021, 04:28 PM
RE: Consume API externally - by includebeer - 10-05-2021, 05:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB