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


TypeScript ng2-ui-auth.JwtHttp類代碼示例

本文整理匯總了TypeScript中ng2-ui-auth.JwtHttp的典型用法代碼示例。如果您正苦於以下問題:TypeScript JwtHttp類的具體用法?TypeScript JwtHttp怎麽用?TypeScript JwtHttp使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: refresh

 refresh() {
     this.http.refreshToken()
         .subscribe({
             error: (err: any) => this.eh.handleError(err),
             complete: () => this.expiration = this.auth.getExpirationDate()
         });
 }
開發者ID:royipressburger,項目名稱:ng2-ui-auth-example,代碼行數:7,代碼來源:main.component.ts

示例2: get

 get(data) {
     this.data = data;
     this.http.get('http://example.com/api/thing')
         .subscribe(
         data => this.result = data,
         err => console.log(err),
         () => console.log('Request Complete')
         );
 }
開發者ID:megamtech,項目名稱:angular-php-framework,代碼行數:9,代碼來源:api.service.ts

示例3: get

 get(url: string, args?: Object): Observable<any> {
   let params: URLSearchParams;
   if (args) {
     params = new URLSearchParams();
     for (let key in args) {
       params.set(key, args[key]);
     }
   }
   let searchParams = {search: params};
   return this.http.get(url, searchParams).map((res: any) => res.json());
 }
開發者ID:royipressburger,項目名稱:ng2-ui-auth-example,代碼行數:11,代碼來源:json-http-service.ts

示例4: post

 post(url, data) {
     this.data = data;
     return this.http.post(url, this.data);
 }
開發者ID:megamtech,項目名稱:angular-php-framework,代碼行數:4,代碼來源:api.service.ts

示例5: get

 get(meetId:string) {
   var url = this.actionUrl + (meetId ? '/' + meetId : '');
   return this._http.get(url)
     .map(this.compose(Meet.from, this.extractData))
     .catch(this.handleError);
 }
開發者ID:everve,項目名稱:slsplay,代碼行數:6,代碼來源:meet-service.ts

示例6: allPublic

 allPublic() {
   var url = this.actionUrl;
   return this._http.get(url + '?public=true')
     .map(this.compose(Meet.from, this.extractData))
     .catch(this.handleError);
 }
開發者ID:everve,項目名稱:slsplay,代碼行數:6,代碼來源:meet-service.ts

示例7: allMine

 allMine() {
   var url = this.actionUrl;
   return this._http.get(url)
     .map(this.compose(Meet.from, this.extractData))
     .catch(this.handleError);
 }
開發者ID:everve,項目名稱:slsplay,代碼行數:6,代碼來源:meet-service.ts

示例8: put

 put(url: string, data, options?: RequestOptionsArgs): Observable<any> {
   data = (typeof (data) === 'string') ? data : JSON.stringify(data);
   return this.http.put(url, data, options).map((res: any) => res.json());
 }
開發者ID:royipressburger,項目名稱:ng2-ui-auth-example,代碼行數:4,代碼來源:json-http-service.ts

示例9: ngOnInit

 ngOnInit() {
     this.user = this.auth.getPayload();
     this.expiration = this.auth.getExpirationDate();
     this.secret = this.http.get('/secret').map(response => response.text());
 }
開發者ID:royipressburger,項目名稱:ng2-ui-auth-example,代碼行數:5,代碼來源:main.component.ts


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