Documentation
¶
Overview ¶
Package httpx centralizes the CLI's outbound HTTP security policy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIBaseURL ¶
APIBaseURL adds Normatik's fixed API context path to a canonical site URL.
func CanonicalSiteURL ¶
CanonicalSiteURL normalizes the user-facing environment URL. A legacy trailing /api context path is stripped because transports own that prefix.
func NewClient ¶
NewClient creates an HTTP client that follows redirects only within the exact original origin (scheme, hostname and effective port). The transport is DefaultTransport wrapped so every request carries the process User-Agent.
func SetUserAgent ¶ added in v1.7.0
func SetUserAgent(value string)
SetUserAgent replaces the User-Agent sent on later requests. NewClient reads it per request, so a client built before this call still sends the new value.
func UserAgent ¶ added in v1.7.0
func UserAgent() string
UserAgent returns the User-Agent the next request will send.
func ValidateBaseURL ¶
ValidateBaseURL allows HTTPS everywhere and plaintext HTTP only for literal loopback targets when the development opt-in is exactly "1".
Types ¶
This section is empty.