This commit is contained in:
Drew Ansbacher
2021-07-13 14:13:33 -06:00
committed by Aiden McClelland
parent edc37e33f1
commit dc71a625b2
6 changed files with 50 additions and 12 deletions

View File

@@ -44,6 +44,11 @@ export class HttpService {
if (isRpcSuccess(res)) return res.result
}
async simpleGet (url: string): Promise<object> {
const data = await this.http.get(url).toPromise()
return data
}
async httpRequest<T> (httpOpts: HttpOptions): Promise<T> {
let { body, timeout, ...rest} = this.translateOptions(httpOpts)
let req: Observable<{ body: T }>