fetch

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchClient

type FetchClient struct {
	*http.Client
	// contains filtered or unexported fields
}

FetchClient is a custom HTTP client.

func NewClient

func NewClient(userAgent string, timeout int, reserveRedirect bool) (client *FetchClient)

NewClient creates a new FetchClient.

func (*FetchClient) Fetch

func (c *FetchClient) Fetch(url *url.URL, header http.Header) (resp *http.Response, err error)

Fetch sends an HTTP GET request to the specified URL and returns the response.

func (*FetchClient) FetchWithContext

func (c *FetchClient) FetchWithContext(ctx context.Context, url *url.URL, header http.Header) (resp *http.Response, err error)

FetchWithContext sends an HTTP GET request with cancellation support.

Jump to

Keyboard shortcuts

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