How to handle POST request in the Standard that were sent as parameters?

Asked

Viewed 103 times

0

Set a route this way in the API:

$this->router->post('/logo', 'MinhaContaLogoController@adicionarLogo')

However, my Client request sends a parameter in the URL under method POST:

/logo?fileapi154288602223716

as this route does not exist the return is 404 Not Found

  • 1

    No. Laravel doesn’t consider ? on the route. The problem may be that it is sending a request GET on a route POST. The return of this is 405 (method not accepted)

  • Got it! Except I can’t handle this request either as GET or POST, as I can’t handle it - la the answer I have is 404 Not Found.

  • 1

    tests there. Send a post via POSTMAN. There may be a lot of problems, including in the configuration of Apache (if you are using)

  • Put all your controller, put all the route file ... at least the way you’re doing is wrong

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.