本文整理汇总了TypeScript中@angular/http.Http.delete方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Http.delete方法的具体用法?TypeScript Http.delete怎么用?TypeScript Http.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/http.Http
的用法示例。
在下文中一共展示了Http.delete方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: delete
delete(login: string): Observable<Response> {
return this.http.delete(`api/users/${login}`);
}
示例2: cancelAllRequestsDispatch
cancelAllRequestsDispatch(studentID) {
return this.http.delete('/api/instantsessions/' + studentID)
.subscribe(() => this.syncStudentRequestsDispatch(studentID));
}
示例3: deleteCategory
deleteCategory(category: Category) {
return this.http.delete(`${BASE_URL}${category.id}`)
.map(res => res.json())
.toPromise();
}
示例4: delete
delete(id: number) {
return this.http.delete('/api/users/' + id, this.jwt()).map((response: Response) => response.json());
}
示例5: deleteData
deleteData(id) {
return this._http.delete('http://jsonplaceholder.typicode.com/posts/1')
.toPromise()
.then(response => response.json())
.catch(this.handleError);
}
示例6: deleteLaboratory
deleteLaboratory(id: number){
return this.http.delete(`/api/laboratory/${id}`).map(res=>res.json());
}
示例7: removeQueueElement
removeQueueElement(element: any) {
this.http.delete(`api/subject/${this.subject.code}/queue/${element._id}`, {
headers: authHeaders()
}).subscribe();
}
示例8: deleteForm
deleteForm(isProd: boolean, form: TicketForm): Observable<any> {
return this.http.delete(`${this.base(isProd)}/ticket_forms/${form.id}.json`, this.options());
}
示例9: deleteScanResultById
deleteScanResultById(id: String) : Observable<any> {
return this.http.delete(`/api/scanResults/${id}`)
.map(mapToJSON);
}
示例10: deleteTodo
deleteTodo(id) {
return this._http.delete('/api/v1/todo/' + id);
}