http

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

func ParseURL(cause error) error

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

func UnsafeURLScheme(scheme string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL