mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
16 lines
422 B
TypeScript
16 lines
422 B
TypeScript
|
import { Http, Response } from "@angular/http";
|
||
|
import { Observable } from "rxjs/Observable";
|
||
|
|
||
|
export class AuthedApi {
|
||
|
public static SCALAR_TOKEN: string = null;
|
||
|
|
||
|
constructor(protected http: Http) {
|
||
|
}
|
||
|
|
||
|
protected authedGet(url: string, qs?: any): Observable<Response> {
|
||
|
if (!qs) qs = {};
|
||
|
qs["scalar_token"] = AuthedApi.SCALAR_TOKEN;
|
||
|
return this.http.get(url, {params: qs});
|
||
|
}
|
||
|
}
|