httputil

package
v0.0.0-...-6b134a9 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientWithOptionalResolvers

func ClientWithOptionalResolvers(resolvers ...string) (*http.Client, error)

ClientWithOptionalResolvers creates an HTTP client with optional custom DNS resolvers. If no resolvers are provided, the default system resolver is used. If a resolver is provided without a port, ":53" is appended to it. The client uses the default Go resolver if the custom resolvers fail to resolve the domain.

func FindScheme

func FindScheme(target string) (string, string, error)

FindScheme attempts to find the scheme of a given target URL.

func IsBinaryResponse

func IsBinaryResponse(resp *http.Response) bool

func RedirectsToHTTPS

func RedirectsToHTTPS(httpURL string) (bool, string, error)

RedirectsToHTTPS checks if a given HTTP URL redirects to an HTTPS URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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