Documentation
¶
Overview ¶
Package useragent identifies Core on every outbound HTTP request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Header ¶
Header returns a header set holding only the User-Agent, for dialers that take headers rather than a request, such as WebSocket handshakes.
func SetPlatform ¶
func SetPlatform(id string)
SetPlatform records the running platform's ID. It is only known once a platform is constructed, so requests made before this omit it.
func String ¶
func String() string
String returns the User-Agent value, for example "Zaparoo-Core/2.18.0 (mister; linux/arm)".
func Transport ¶
func Transport(base http.RoundTripper) http.RoundTripper
Transport wraps base so every request carries the User-Agent. A nil base uses http.DefaultTransport as it is at request time, so a later swap of the default transport (custom TLS roots) still applies.
Types ¶
This section is empty.