Closed mothershipper closed 4 months ago
Hey @mothershipper, yes, that sounds like a feature clients will be able to handle.
@mothershipper this is available in the Fetch API client. You can view the demo where I added an example of local client. Would love to hear your thoughts!
Appreciate the quick turn-around, I'll give it a shot today!
Looks like it'll work, thank you!
One ask -- could @hey-api/client-fetch
export the FetchClient
interface? Right now I'm using ReturnType<typeof createClient>
Sure. I should probably rename it to Client
then!
Description
Hi there! Wondering if there are plans to support config/client instances (rather than globals/singletons), or if you'd be open to a pull request that adds that?
Our use case is that for certain APIs we have a dynamic number of client credentials and would feel better about constructing and caching or disposing of the config and clients between uses. I believe we can use interceptors as a workaround currently, but generally we try to avoid global state where we can.