internal: incomplete vault systems behind feature flag (#2340)
This commit is contained in:
@@ -53,7 +53,15 @@ export class HttpService implements HttpServiceInterface {
|
||||
this.host = host
|
||||
}
|
||||
|
||||
getHost(): string {
|
||||
return this.host
|
||||
}
|
||||
|
||||
async get<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>> {
|
||||
if (!this.host) {
|
||||
throw new Error('Attempting to make network request before host is set')
|
||||
}
|
||||
|
||||
return this.runHttp({
|
||||
url: joinPaths(this.host, path),
|
||||
params,
|
||||
@@ -62,7 +70,20 @@ export class HttpService implements HttpServiceInterface {
|
||||
})
|
||||
}
|
||||
|
||||
async getExternal<T>(url: string, params?: HttpRequestParams): Promise<HttpResponse<T>> {
|
||||
return this.runHttp({
|
||||
url,
|
||||
params,
|
||||
verb: HttpVerb.Get,
|
||||
external: true,
|
||||
})
|
||||
}
|
||||
|
||||
async post<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>> {
|
||||
if (!this.host) {
|
||||
throw new Error('Attempting to make network request before host is set')
|
||||
}
|
||||
|
||||
return this.runHttp({
|
||||
url: joinPaths(this.host, path),
|
||||
params,
|
||||
|
||||
Reference in New Issue
Block a user