當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。