mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
17477c4fd7
commit
d49b38b6df
1 file changed
+2
-4
@@ -55,9 +55,7 @@ export class JsonApi<D = JsonApiData, P extends JsonApiParams = JsonApiParams> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getResponse(path: string, params?: P, init: RequestInit = {}): Promise<Response> {
|
getResponse(path: string, params?: P, init: RequestInit = {}): Promise<Response> {
|
||||||
const reqPath = `${this.config.apiBase}${path}`;
|
let reqUrl = `${this.config.apiBase}${path}`;
|
||||||
//const subdomain = randomBytes(2).toString("hex");
|
|
||||||
let reqUrl = reqPath; //`http://${subdomain}.${window.location.host}${reqPath}`; // hack around browser connection limits (chromium allows 6 per domain)
|
|
||||||
const reqInit: RequestInit = { ...init };
|
const reqInit: RequestInit = { ...init };
|
||||||
const { query } = params || {} as P;
|
const { query } = params || {} as P;
|
||||||
|
|
||||||
@@ -73,7 +71,7 @@ export class JsonApi<D = JsonApiData, P extends JsonApiParams = JsonApiParams> {
|
|||||||
|
|
||||||
const infoLog: JsonApiLog = {
|
const infoLog: JsonApiLog = {
|
||||||
method: reqInit.method.toUpperCase(),
|
method: reqInit.method.toUpperCase(),
|
||||||
reqUrl: reqPath,
|
reqUrl,
|
||||||
reqInit,
|
reqInit,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user