当前位置: 首页>>代码示例>>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;未经允许,请勿转载。