Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229600

Readable http body

$
0
0

I’d like to make the following code cleaner:

this.http.post("http://..........", 'username=' + user + '&password=' + passw, options)

I tried this code but it doesn’t work:

let body = JSON.stringify({
        username: user,
        password: passw
      });

      this.http.post("http://..........", body, options)

Viewing all articles
Browse latest Browse all 229600

Trending Articles



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