-
-
Save wKoza/53668364c4dd2c9bc3c329821e33408e 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
const headers = new Headers({'Content-Type': 'application/json'}); | |
const options = new RequestOptions({ headers: headers }); | |
private url = 'api.learn-angular.fr/article'; | |
Observable<Article> article$ = this.http.post(url, JSON.stringify(article), options) | |
.map((res:Response) => res.json() as Article) | |
.catch(this.handleError); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment