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


TypeScript AuthHttp.put方法代码示例

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


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

示例1: put

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

示例2: updatePanel

  updatePanel(panelId: number, panelDTO: PanelDTO): Observable<Panel> {
    let body = JSON.stringify(panelDTO);
    let headers = new Headers({'Content-Type': 'application/json'});
    let options = new RequestOptions({ headers: headers});

    return this.authHttp.put(PAP_API_URL + `/panels/${panelId}`, body, options) 
      .map(response => response.json())
      .catch(this.logAndPassOn);
  }
开发者ID:kjbetz,项目名称:ami-dev,代码行数:9,代码来源:data-access.service.ts

示例3: put

  public put(url: string, data: Object, headers: Object = {}): Observable<Response> {

    const options = new RequestOptions({ headers: this.headers});

    return this.http.put(url, JSON.stringify(data), options)
        .map((response: Response) => {
            this.authService.saveToken(response);
            return response.json() as Response;
        })
        .catch((error: Response) => {
          this.authService.saveToken(error);
          this.toastr.error(error);
          return Observable.throw(error);
        });
  }
开发者ID:bigfish-hu,项目名称:remarker,代码行数:15,代码来源:api.service.ts

示例4: putUrl

 /**
  * Adds the URL of the thumbnail API to the API Call and does a HTTP GET request.
  *
  * @param apiUrl relative path for the call
  * @param data the data which shall be send
  * @param headers additional headers
  * @returns {Observable<Response>}
  */
 public putUrl(apiUrl: string, data: any, headers: object = {}) {
   this.setUrl();
   return this.authHttp.put(this.thumbnailApiUrl + apiUrl, data, headers);
 }
开发者ID:HiP-App,项目名称:HiP-CmsAngularApp,代码行数:12,代码来源:thumbnail-api.service.ts

示例5: put

 public put(url: string, body: any, options?: RequestOptionsArgs): Observable<Response> {
   return this.authIntercept(this.authHttp.put(url, body, options));
 }
开发者ID:Sirimangalo,项目名称:meditation-plus-angular,代码行数:3,代码来源:auth-http.service.ts

示例6: putUrl

 /**
  * Adds the userStoreUrl to the api Call and do a HTTP GET request
  * @param apiUrl relative path for the call
  * @param data the data which shall be send
  * @param headers additional headers
  * @returns {Observable<Response>}
  */
 public putUrl(apiUrl: string, data: string, headers: any) {
   this.setUrl();
   return this.http.put(this.userStoreUrl + apiUrl, data, headers);
 }
开发者ID:HiP-App,项目名称:HiP-CmsAngularApp,代码行数:11,代码来源:userstore-api.service.ts

示例7: updateIdentifier

 // Delete an identifier from a person
 public updateIdentifier(identifier:any):Observable<any> {
   console.log('Service update:', identifier);
   return this.http.put(
     env.apiRoot + '/identifier/'+ identifier.id, identifier
   ).map(res=>res.json());
 }
开发者ID:urbanlink,项目名称:vooot-api,代码行数:7,代码来源:vooot-person.service.ts

示例8: update

 public update(id:Number, person:any):Observable<any> {
   return this.http.put(
     env.apiRoot + '/person/' + id, person
   ).map(res=>res.json());
 }
开发者ID:urbanlink,项目名称:vooot-api,代码行数:5,代码来源:vooot-person.service.ts

示例9: update

 update(company:Company): Promise<Company> {
     let headers = new Headers({'Content-Type': 'application/json'});
     return this.http.put(this.conf.companyByIdURL(company.id), JSON.stringify(company), {headers: headers})
         .toPromise()
         .then(response => response.json())
 }
开发者ID:rudkodm,项目名称:closer-ui,代码行数:6,代码来源:companies.service.ts

示例10: put

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


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