Me rindo, no encuentro donde falla el verbo - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1) +--- Forum: Regional User Groups (https://forum.codeigniter.com/forumdisplay.php?fid=25) +--- Thread: Me rindo, no encuentro donde falla el verbo (/showthread.php?tid=82001) |
Me rindo, no encuentro donde falla el verbo - Worked - 06-02-2022 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. RE: Me rindo, no encuentro donde falla el verbo - iRedds - 06-02-2022 english please RE: Me rindo, no encuentro donde falla el verbo - InsiteFX - 06-02-2022 Most new Web Browsers have translate built in now. Chrome right click translate. RE: Me rindo, no encuentro donde falla el verbo - Worked - 06-03-2022 (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/incoming/methodspoofing.html |