-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'd like a straightforward way to set default headers for requests. This is important for us because we use headers like Accept-Language and User-Agent for analytical purposes, among other things.
The api could extend the one proposed in #110 :
export async function createAgent({
domain,
locale,
}: AgentProps) {
const baseUrl = someLogicToDetermineBaseUrl(domain);
const userAgent = getVersionString()
const agent = new sdk.client({
defaultConfiguration: {
baseUrl: new URL(baseUrl),
headers: {
'Accept-Language': locale,
'User-Agent': userAgent,
}
}
});
return agent;
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request