![]() |
Saludos,
Llevo casi una hora peleandome con el siguiente código, en el que estoy seguro de que el "verbo" es el problema: He usado la misma ruta para los tres verbos, he cambiado el nombre del controlador por si CodeIgniter usaba el nombre "Enforce" en alguna parte del core, he ... N, pero el resultado es siempre el mismo. GET resuelve sin problemas, pero cuando trato de usar POST o PUT CodeIgniter me devuelve todo el rato al controlador por defecto (login). Estos son los archivos: PHP Code: Routes.php PHP Code: Enforce.php Tengo habilitado CSRF, sí, lo tengo habilitado... pero el caso es que en la petición FETCH envío el token y código csrf por lo que no debería ser el problema. Code: JavaScript Ya estoy tirandome de los pelos... ¿alguna sugerencia? Gracias.
Most new Web Browsers have translate built in now. Chrome right click translate.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(06-02-2022, 08:04 PM)iRedds Wrote: english please Hi. Quote:Cheers, UPDATE: After posting here, I continued doing a few tests trying to get a clear solution. I've gotten the POST to work over 50% of the cases it hits the controller. I've also gotten the PUT verb to work at 50% too, but using the HTTP spoofing method(1), which doesn't really seem like the best solution to me since it's sending unnecessary parameters and I really wouldn't want to have to fill the API with all those hidden input ="_method". Thanks (1) https://codeigniter4.github.io/userguide...ofing.html |
Welcome Guest, Not a member yet? Register Sign In |