@apptrium/http-client
v1.11.1
Published
Invent.us
Downloads
73
Keywords
Readme
Http client
Info
Client used to inject into widgets to provide data fetch from API.
Usage
Import and pass into widget as a prop:
import { getHttpClient } from '@invent/http-client';
const httpClient = getHttpClient();
<WidgetComponent httpClient={httpClient} />;
Args:
type args {
apiUrl: string = '',
traceId: string,
method?: string,
headers?: Record<string, string>,
errorHandler?: (e: ErrorEvent) => Error
}