Documentation
¶
Overview ¶
Package http provides error constructors for HTTP client safety checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseURL ¶
ParseURL wraps a failure to parse a URL.
Parameters:
- cause: the underlying parse error
Returns:
- error: "parse URL: <cause>"
func TooManyRedirects ¶
func TooManyRedirects() error
TooManyRedirects returns an error when an HTTP response exceeds the redirect limit.
Returns:
- error: "too many redirects: limit exceeded"
func UnsafeURLScheme ¶
UnsafeURLScheme returns an error when a URL uses a scheme other than http or https.
Parameters:
- scheme: the rejected URL scheme
Returns:
- error: "unsafe URL scheme: <scheme>: only http and https are allowed"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.