I created a login form that uses email and password for authentication, but the credentials are not sent in the request body and I get a 500 error.
This is my login method:
if ($this->request->is('post')) {
$response = $http->post(
'http://localhost:8889/api/..',
[
'email' => $this->request->getData("email"),
'password' => $this->request->getData("password"),
]
);
debug($response);
In the image it is possible to verify a little more than I receive.
I put the information below in the debug, and I get the value coming from the form.
‘email’ => $this->request->getData(“email”), ‘password’ => $this->request->getData(“password”)
When I test via mailman, the login is successful! Information coming from the form is not sent to the backend. Can you help me analyze?