# Http Post Request Data not Correct

**URL:** <https://forum.ionicframework.com/t/http-post-request-data-not-correct/133111>\
**Category:** ionic-v3\
**Created:** [June 19, 2018, 8:36am UTC](https://forum.ionicframework.com/t/http-post-request-data-not-correct/133111 "2018-06-19T08:36:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebeliejinfren](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ebeliejinfren/32/123635_2.png) [@ebeliejinfren](https://forum.ionicframework.com/u/ebeliejinfren)\
**Post date:** [June 19, 2018, 8:36am UTC](https://forum.ionicframework.com/t/http-post-request-data-not-correct/133111/1 "2018-06-19T08:36:48Z")

</div>

Hi  
i use http post method for auth but its not work, in get method every things work good but in Post not  
this is my code :

```auto
doLogin(username,password){
         this.body = {
            username: username,
            password: password
        };
         let headers = new Headers;
           headers.set('Content-Type', 'application/x-www-form-urlencoded');
        return this.http.post(this.API_LOGIN,JSON.stringify(this.body),{headers: {'Content-Type': 'application/x-www-form-urlencoded'}});
    }

```

and this screen shot show that data not correct format

> **[Capture 12](https://ibb.co/kVcJPd)**
>
> Image Capture 12 hosted in imgbb.com

why data format not correct ?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:32pm UTC](https://forum.ionicframework.com/t/http-post-request-data-not-correct/133111/2 "2021-07-19T21:32:05Z")

</div>


