本文整理匯總了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);
}