📜  angular httpclient post body - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:05.243000             🧑  作者: Mango

代码示例1
ngOnInit() {
    this.http.post('https://jsonplaceholder.typicode.com/posts', { title: 'Angular POST Request Example' }).subscribe(data => {
        this.postId = data.id;
    })
}