httputil

package
v0.0.0-...-6670238 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 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 default and custom resolvers that are optionally provided. If no resolvers are provided, the default resolver is used, utilizing an IP cache to store and reuse resolved IP addresses.

func FindScheme

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

FindScheme determines the scheme (http or https) for a given IP or domain, considering the port if specified.

func IsBinaryResponse

func IsBinaryResponse(resp *http.Response) bool

func RedirectsToHTTPS

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

RedirectsToHTTPS checks for various types of redirects (Location header, Refresh header, and meta refresh tags) and returns true if there's a redirect to an HTTPS URL along with the final URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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