# The values are not sent via the request body. - Cakephp 4

**URL:** <https://discourse.cakephp.org/t/the-values-are-not-sent-via-the-request-body-cakephp-4/10798>\
**Category:** Need Help\
**Created:** [November 30, 2022, 6:57pm UTC](https://discourse.cakephp.org/t/the-values-are-not-sent-via-the-request-body-cakephp-4/10798 "2022-11-30T18:57:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecei](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@ecei](https://discourse.cakephp.org/u/ecei)\
**Post date:** [November 30, 2022, 6:57pm UTC](https://discourse.cakephp.org/t/the-values-are-not-sent-via-the-request-body-cakephp-4/10798/1 "2022-11-30T18:57:47Z")

</div>

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:

```auto
        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.  
[![enter image description here](https://i.stack.imgur.com/Jy1NO.png)](https://i.stack.imgur.com/Jy1NO.png)

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?

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [December 1, 2022, 8:21am UTC](https://discourse.cakephp.org/t/the-values-are-not-sent-via-the-request-body-cakephp-4/10798/2 "2022-12-01T08:21:06Z")

</div>

If you get a 500 error from your API then you should look into the `error.log` of that specific API to understand what is happening.  
What you are posting here seems fine so we can only guess what is wrong.
