當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Http.delete方法代碼示例

本文整理匯總了TypeScript中angular2/http.Http.delete方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Http.delete方法的具體用法?TypeScript Http.delete怎麽用?TypeScript Http.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在angular2/http.Http的用法示例。


在下文中一共展示了Http.delete方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: deleteBlogEntry

 deleteBlogEntry(id: number): Observable<Response> {
   return this.http.delete('/api/blogs/' + id)
 }
開發者ID:krimple,項目名稱:angular2-unittest-samples-webpack,代碼行數:3,代碼來源:blog-service.ts

示例2: deleteJSON

	deleteJSON(url: string, cb: ServerResponse): void {
		this.http.delete(url)
			.subscribe((res: Response) => {
				cb(res.json());		//callBack		
			});
	} 	//deleteJSON
開發者ID:uqutub,項目名稱:taskManagement,代碼行數:6,代碼來源:httpService.ts

示例3: unfavorite

 unfavorite(item) {
   return this.http.delete(favoritesURL + item.id).map(res => res.json()).catch(this.handleError);
 }
開發者ID:dicastro,項目名稱:ionic2-tutorial,代碼行數:3,代碼來源:item-service.ts

示例4: deleteFamily

 deleteFamily(id) {
     return this._http.delete("/api/products/family/" + id)
         .map(response => response.json());
 }
開發者ID:rberneder,項目名稱:huepro,代碼行數:4,代碼來源:product.service.ts

示例5: delete

 public delete(p:Post) {
     return this._http
         .delete('./api/posts/' + p._id,
                 this._headerService.getJsonHeaders(this._loginService.getToken()))
         .map(res => res.json())
 }
開發者ID:WillGluck,項目名稱:Playground-Angular2,代碼行數:6,代碼來源:post.ts

示例6: deleteAllData

 deleteAllData(): Observable<any> {
     const token = localStorage.getItem('token') !== null ? '?auth=' + localStorage.getItem('token') : '';        
     return this._http.delete('https://a2-dev.firebaseio.com/users/data.json' + token)
         .map(response => response.json());
 }
開發者ID:thrash4life,項目名稱:A2,代碼行數:5,代碼來源:data.service.ts

示例7: deleteProduct

 deleteProduct(id) {
     return this._http.delete("api/products/id/" + id)
         .map(response => response.json());
 }
開發者ID:rberneder,項目名稱:huepro,代碼行數:4,代碼來源:product.service.ts

示例8: deleteStudent

	deleteStudent(student: Student): Observable<Response> {
		return this.http.delete('http://localhost:8080/api/student/'+student.id);
	}
開發者ID:jiguan,項目名稱:springboot-angular2,代碼行數:3,代碼來源:student.service.ts

示例9: delete

    delete(url:string, defaultOptions?: RequestOptions): Observable<Response> {
        let options:RequestOptions = this.manageRequestOptions(defaultOptions);

        return this.http.delete(rootUrl+url, options);
    }
開發者ID:brunoavelar,項目名稱:GigHub,代碼行數:5,代碼來源:authorized.http.ts

示例10: deleteItem

 deleteItem(item: Item) {
   return this.http.delete(`${BASE_URL}${item.id}`)
     .map(res => res.json())
     .toPromise();
 }
開發者ID:BoomDone,項目名稱:fem-ng2-rest-app,代碼行數:5,代碼來源:items.service.ts


注:本文中的angular2/http.Http.delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。