Welcome Guest, Not a member yet? Register   Sign In
Problem with AJAX request

I did simple request

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

url: "/go/ <- slash

Theme © iAndrew 2016 - Forum software by © MyBB