Created
November 1, 2017 11:08
-
-
Save iworkforthem/d1e1321eb08d87f0153b7c24e1bc6c6b to your computer and use it in GitHub Desktop.
ionic 2 http post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var url = 'http://127.0.0.1:3000/'; | |
| var headers = new Headers(); | |
| headers.append('Content-Type', 'application/x-www-form-urlencoded'); | |
| let param = 'name=' + this.signup.username + '&email=' + '&mobile='; | |
| this.http.post(url, param, { headers: headers }).subscribe(data => { | |
| console.log(data) | |
| }, error => { | |
| console.log(error); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment