ing
This commit is contained in:
parent
43582c7199
commit
2281d5fab7
|
@ -41,7 +41,9 @@ export class Effects {
|
|||
() => {
|
||||
let queryString: string;
|
||||
if (this.cookieService.check('AuthToken')) {
|
||||
queryString = `AuthToken=${this.cookieService.get('AuthToken')}`;
|
||||
const authToken = this.cookieService.get('AuthToken');
|
||||
console.log(`AuthToken: ${authToken}`);
|
||||
queryString = `AuthToken=${authToken}`;
|
||||
}
|
||||
this.rpcClient.connect(queryString);
|
||||
}
|
||||
|
|
|
@ -12,14 +12,10 @@ import 'rxjs/add/observable/throw';
|
|||
import { RESTError } from '../error';
|
||||
|
||||
export class RESTClient {
|
||||
private readonly httpHeaders: HttpHeaders;
|
||||
|
||||
constructor(
|
||||
private _baseURL: string,
|
||||
private _httpClient: HttpClient,
|
||||
) {
|
||||
this.httpHeaders = new HttpHeaders()
|
||||
.set('Content-Type', 'application/json');
|
||||
}
|
||||
|
||||
public get httpClient(): HttpClient {
|
||||
|
@ -39,7 +35,7 @@ export class RESTClient {
|
|||
reportProgress?: boolean;
|
||||
withCredentials?: boolean;
|
||||
}): Observable<T> {
|
||||
const headers: HttpHeaders = this.httpHeaders;
|
||||
options.withCredentials = true;
|
||||
|
||||
return this._httpClient
|
||||
.request(method, Location.joinWithSlash(this._baseURL, entry), options)
|
||||
|
|
Loading…
Reference in New Issue
Block a user