/** * @webpieces/http-client-browser * * The BROWSER HTTP client. Reads an API contract's decorators and generates type-safe HTTP * clients from it — the same contract the server implements. * * DI-free on purpose: this may be bundled by React or Angular, so it ships no inversify and no * @webpieces/core-context (which is AsyncLocalStorage-backed and Node-only). Browsers have no * ambient request scope, so the app holds a {@link MutableContextStore} and sets context values * as they become known; every outbound call then transfers them as headers. * * Usage: * ```typescript * import { ClientHttpBrowserFactory, ClientConfig, MutableContextStore } from '@webpieces/http-client-browser'; * * HeaderRegistry.configure(CompanyHeaders.ALL_HEADERS, true); * const store = new MutableContextStore(); * const factory = new ClientHttpBrowserFactory(store); * * const client = factory.createRpcClient(SaveApi, new ClientConfig('save-svc')); * const response = await client.save({ query: 'test' }); * ``` * * The server twin is @webpieces/http-client-node. */ export { ClientHttpBrowserFactory } from './ClientHttpBrowserFactory'; export { BrowserProxyClient } from './BrowserProxyClient'; export { BrowserApiCallContext } from './BrowserApiCallContext'; export { ClientConfig } from './ClientConfig'; export { MutableContextStore } from './MutableContextStore'; export type { RequestLifecycleListener } from './RequestLifecycleListener'; export { ProxyClient, ClientErrorTranslator, RequestOutcome, TranslatedFailure } from '@webpieces/http-client-core'; export type { ApiPrototype } from '@webpieces/http-client-core'; export { ContextMgr } from '@webpieces/core-util'; export { ContextReader, ContextKey, HeaderRegistry, ClientRegistry, templateDeriver, WebpiecesCoreHeaders, } from '@webpieces/core-util'; export type { ServiceUrlDeriver } from '@webpieces/core-util'; export { ApiPath, Endpoint, Public, AuthJwt, AuthOidc, AuthSharedSecret, AuthLocalOnly, Rpc, PubSub, Queue, ValidateImplementation, } from '@webpieces/core-util';