Created
June 13, 2017 05:34
-
-
Save alfredfrancis/62d09b6ad442910b08e3216a6d4bde2b to your computer and use it in GitHub Desktop.
This file contains 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
postFeedback(feedback){ | |
return new Promise( | |
(resolve,reject)=>{ | |
let headers = new Headers( | |
{ | |
'Content-Type': 'application/json' | |
} | |
) | |
let options = new RequestOptions( | |
{ | |
headers:headers | |
} | |
) | |
this.http.post("http://localhost:7050/feedbacks", | |
feedback, | |
options | |
) | |
.subscribe(data =>{ | |
resolve(data) | |
}, | |
errData =>{ | |
reject(errData) | |
} | |
) | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment