Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49308

Http Post Request Data not Correct

$
0
0

@ebeliejinfren wrote:

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 :

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

why data format not correct ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49308

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>