Skip to content

Instantly share code, notes, and snippets.

@alfredfrancis
Created June 13, 2017 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredfrancis/62d09b6ad442910b08e3216a6d4bde2b to your computer and use it in GitHub Desktop.
Save alfredfrancis/62d09b6ad442910b08e3216a6d4bde2b to your computer and use it in GitHub Desktop.
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