-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.browser.ts
More file actions
28 lines (24 loc) · 738 Bytes
/
index.browser.ts
File metadata and controls
28 lines (24 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import normalizeUrl from "normalize-url";
import { ClientUtilsBase } from "./client-utils";
import { HttpClientBrowser as HttpClient } from "./types";
/**
* Provides HTTP communication methods.
*
* @class ClientUtils
* @extends ClientUtilsBase
* @classdesc Provides HTTP communication methods.
*/
export class ClientUtils extends ClientUtilsBase implements HttpClient {
constructor(
apiBase: string,
) {
super(apiBase, window.fetch.bind(window), normalizeUrl);
}
}
export { ClientError } from "./client-error";
export type { ClientErrorCode } from "./client-error";
export type { RequestLogger } from "./types";
export interface ClientProvider {
client: HttpClient;
}
export type { HttpClient };