当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript AuthHttp.delete方法代码示例

本文整理汇总了TypeScript中angular2-jwt.AuthHttp.delete方法的典型用法代码示例。如果您正苦于以下问题:TypeScript AuthHttp.delete方法的具体用法?TypeScript AuthHttp.delete怎么用?TypeScript AuthHttp.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在angular2-jwt.AuthHttp的用法示例。


在下文中一共展示了AuthHttp.delete方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: delete

 delete(url) {
     let headers = new Headers();
     headers.append('Content-Type', 'application/json');
     return this._authHttp.delete(url, {
         headers: headers
     });
 }
开发者ID:z424brave,项目名称:DKClient,代码行数:7,代码来源:http-client.ts

示例2: removeMember

	/** Removes the given member of the party. */
	removeMember(party: Party, member: Member): Observable<Member> {
		return this.http.delete(`${API_URL}/${party._key}/${member._key}`)
			.map((res: Response) => {
				const json = res.json();
				const member = Deserialize(json, Member);
				return member;
			});
	}
开发者ID:andregs,项目名称:think-before-voting,代码行数:9,代码来源:party.service.ts

示例3: remove

	/** Deletes the given political party. */
	remove(party: Party): Observable<Party> {
		return this.http.delete(`${API_URL}/${party._key}`)
			.map((res: Response) => {
				const json = res.json();
				const party = Deserialize(json, Party);
				return party;
			});
	}
开发者ID:andregs,项目名称:think-before-voting,代码行数:9,代码来源:party.service.ts

示例4: unfollow

	/** Unfollows the given user. */
	unfollow(user: User): Observable<any> {
		const url = `${API_URL}/${user._key}/follow`;
		return this.http.delete(url)
			.map((res: Response) => {
				const removed = res.json();
				return removed;
			});
	}
开发者ID:andregs,项目名称:think-before-voting,代码行数:9,代码来源:profile.service.ts

示例5: deleteTest

 deleteTest(test) {
   console.log(test);
   let url = 'http://localhost:8080/api/adTest/' + test.id;
   this.authHttp.delete(url)
     .subscribe(
       response => {
           let r = response.json().response;
           this.loadUserTests();
       },
       error => this.response = error.text()
     );
 }
开发者ID:DavideMontersino,项目名称:angular2-authentication-sample,代码行数:12,代码来源:home.ts

示例6: removeFromCart

 removeFromCart(id): Observable<any> {
     const productUrl = `/api/user/cart/remove/${id}`;
     return this.authHttp.delete(productUrl)
         .map((res: Response) => res.json())
         .map(res => {
             if (res.success) {
                 const cart = res.cart || 0;
                 if (typeof window !== 'undefined') {
                     localStorage.setItem('id_cart', cart);
                 }
                 this.navService.changeCart(cart);
                 return true;
             }
             return false;
         });
 }
开发者ID:oneuptim,项目名称:node-amazon,代码行数:16,代码来源:cart.service.ts

示例7: deleteJob

 // Delete an identifier from a person
 public deleteJob(personId:Number, jobId:Number):Observable<Object> {
   return this.http.delete(
     env.apiRoot + '/person/' + personId + '/job/' + jobId
   ).map(res=>res.json());
 }
开发者ID:urbanlink,项目名称:vooot-api,代码行数:6,代码来源:vooot-person.service.ts

示例8: deleteLink

 // Delete an identifier from a person
 public deleteLink(personId:Number, linkId:Number):Observable<any> {
   return this.http.delete(
     env.apiRoot + '/link/' + linkId
   ).map(res=>res.json());
 }
开发者ID:urbanlink,项目名称:vooot-api,代码行数:6,代码来源:vooot-person.service.ts

示例9: delete

 delete(company: Company) {
     return this.http.delete(this.conf.companyByIdURL(company.id))
         .toPromise()
         .then(response => response.json())
 }
开发者ID:rudkodm,项目名称:closer-ui,代码行数:5,代码来源:companies.service.ts

示例10: delete

 public delete(url: string, options?: RequestOptionsArgs): Observable<Response> {
   return this.http.delete(url, options).catch((error) =>
     error.status === 401 ?
       this.tokenService.mustUpdateToken().flatMap((data: any) => this.delete(url, options)) :
       Observable.throw(error));
 }
开发者ID:empirefox,项目名称:ec-front,代码行数:6,代码来源:retry-http.ts


注:本文中的angular2-jwt.AuthHttp.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。