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


TypeScript HttpHeaders.get方法代碼示例

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


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

示例1: paginateTimeTasks

 private paginateTimeTasks(data: ITimeTask[], headers: HttpHeaders) {
     this.links = this.parseLinks.parse(headers.get('link'));
     this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
     for (let i = 0; i < data.length; i++) {
         this.timeTasks.push(data[i]);
     }
 }
開發者ID:crille,項目名稱:konsultklockan,代碼行數:7,代碼來源:time-task.component.ts

示例2: paginateOperations

 protected paginateOperations(data: IOperation[], headers: HttpHeaders) {
     this.links = this.parseLinks.parse(headers.get('link'));
     this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
     for (let i = 0; i < data.length; i++) {
         this.operations.push(data[i]);
     }
 }
開發者ID:hmessafi,項目名稱:jhipster-sample-app,代碼行數:7,代碼來源:operation.component.ts

示例3: getBearerRealm

    // Returns the URL from the returned www-authenticate that should
    // be called to authenticate the caller.
    private getBearerRealm(headers: HttpHeaders): string {
        if (! headers.has('www-authenticate')) {
            return;
        }

        let authHeader: string = headers.get('www-authenticate');
        let authHeaderValues = authHeader.replace(' ', '').split(',');

        if (authHeaderValues.length === 0) {
            return;
        }
        
        authHeaderValues = authHeaderValues[0].split('=');
        if (authHeaderValues.length !== 2 || authHeaderValues[0] !== 'realm') {
            return null;
        }

        return authHeaderValues[1];
    }
開發者ID:grecosoft,項目名稱:Sandbox,代碼行數:21,代碼來源:ApiClient.ts

示例4: getUsrsList

 getUsrsList(tableFilter) {
   let url = `${environment.url}users`;
   let headers = new HttpHeaders();
   let params = new HttpParams();
   for (var i =0; i < tableFilter.length; i++) {
     const obj = tableFilter[i];
     const key =  Object.keys(obj)[0];
     params = params.append(key, obj[key]);
   }
 //  params = params.append('department', 'product');
 //  params = params.append('department', 'Dept');
  // params['order-by'] = 'firstName,desc';
   headers = headers.set('X-Jwt-Token',environment.token);
   console.log(headers.get('X-Jwt-Token'));
   return this.http.get(url, {
     headers: headers,
     params: params
   });
 }
開發者ID:pssubashps,項目名稱:angular-filter-demo,代碼行數:19,代碼來源:api.service.ts

示例5: paginateHistoryMessages

 private paginateHistoryMessages(data: IHistoryMessage[], headers: HttpHeaders) {
     this.links = this.parseLinks.parse(headers.get('link'));
     this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
     this.queryCount = this.totalItems;
     this.historyMessages = data;
 }
開發者ID:gjik911,項目名稱:git_01,代碼行數:6,代碼來源:history-message.component.ts

示例6: paginateTodos

 private paginateTodos(data: ITodo[], headers: HttpHeaders) {
     this.links = this.parseLinks.parse(headers.get('link'));
     this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
     this.queryCount = this.totalItems;
     this.todos = data;
 }
開發者ID:mantonaci,項目名稱:jhipster5java10,代碼行數:6,代碼來源:todo.component.ts

示例7: paginateRestaurantes

 protected paginateRestaurantes(data: IRestaurante[], headers: HttpHeaders) {
   this.links = this.parseLinks.parse(headers.get('link'));
   this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
   this.restaurantes = data;
 }
開發者ID:jbbfreitas,項目名稱:BestMeal,代碼行數:5,代碼來源:restaurante.component.ts

示例8: paginateCartaoCreditos

 protected paginateCartaoCreditos(data: ICartaoCredito[], headers: HttpHeaders) {
   this.links = this.parseLinks.parse(headers.get('link'));
   this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
   this.cartaoCreditos = data;
 }
開發者ID:jbbfreitas,項目名稱:BestMeal,代碼行數:5,代碼來源:cliente-cartao.component.ts

示例9: paginateMunicipios

 protected paginateMunicipios(data: IMunicipio[], headers: HttpHeaders) {
   this.links = this.parseLinks.parse(headers.get('link'));
   this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
   this.municipios = data;
 }
開發者ID:jbbfreitas,項目名稱:BestMeal,代碼行數:5,代碼來源:municipio.component.ts

示例10: paginateAclClasses

 protected paginateAclClasses(data: IAclClass[], headers: HttpHeaders) {
     this.links = this.parseLinks.parse(headers.get('link'));
     this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
     this.queryCount = this.totalItems;
     this.aclClasses = data;
 }
開發者ID:timstoner,項目名稱:taskapp,代碼行數:6,代碼來源:acl-class.component.ts


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