Problem with AJAX request |
I did simple request
$.ajax({ url: "/go/", method: "POST", data: { value: "test" }, headers: {'X-Requested-With': 'XMLHttpRequest'}, }); Made router $routes->post('go', [Owners::class, 'GetOffices']); Controller Owner public function GetOffices () { return $this->response->setJson((new OwnerModel)->GetOffices()); } And got next POST http://localhost/go/ [HTTP/1.1 301 Moved Permanently 0ms] GET http://localhost/go [HTTP/1.1 404 Not Found 57ms] What goes wrong? I need only one post requestŠ± with json result |
Messages In This Thread |
Problem with AJAX request - by motoroller - 11-17-2022, 06:24 AM
RE: Problem with AJAX request - by iRedds - 11-17-2022, 09:20 AM
|