📜  angular http PUT - Javascript 代码示例

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

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