CodeIgniter Forums
Why does HTTP 303 error occur? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Why does HTTP 303 error occur? (/showthread.php?tid=87230)



Why does HTTP 303 error occur? - BhrabhMikchel - 03-28-2023

I am developing a RESTful API and I started with the User module. I created a route for user creation with the following code:

php

$routes->post('users', 'UsersController::create');
However, when I tried to access the endpoint using Insomnia, I kept getting redirected to the default controller with the message "HTTP 303 See Other". Interestingly, when I changed the verb to PUT and the route to "put()", everything worked smoothly.

My question is: Did I miss a step in the process?

Here are some additional details about my code:

In the Routes.php file, I have set the default namespace to 'App\Controllers', default controller to 'Home', default method to 'index', and disabled URI dashes translation. I have also overridden the 404 error page and enabled auto-routing.

My UsersController is extending the CodeIgniter\RESTful\ResourceController.


RE: Why does HTTP 303 error occur? - InsiteFX - 03-28-2023

Please READ:

What Is a 303 See Other Error?