Documentation
¶
Overview ¶
Package httpheaders provides shared User-Agent resolution for all HTTP-based providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallHeaders ¶ added in v0.36.0
CallHeaders resolves per-call headers. It returns the headers map and true if per-call headers should be applied, or nil and false if the client-level headers should be used as-is.
func CallUserAgent ¶
CallUserAgent resolves the User-Agent for a single API call. It returns the resolved UA string and true if a per-call override should be applied, or empty string and false if the client-level UA should be used as-is.
func DefaultUserAgent ¶
DefaultUserAgent returns the default User-Agent string for the SDK. The result is "Charm Fantasy/<version>".
func ResolveHeaders ¶
ResolveHeaders returns a new header map, with a User-Agent field.
Setting the value via WithUserAgent() takes precedence, however the user agent can also be set via HTTP headers (i.e. WithHeaders()). Otherwise, the default user agent will be used, i.e. Charm Fantasy/0.11.0.
Also note that the input map is never mutated.
Types ¶
This section is empty.