client

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
	SetCookies(u *url.URL, cookies []*http.Cookie)
}

func NewClient

func NewClient(ttl time.Duration) HTTPClient

type MockHttpClient

type MockHttpClient struct {
	DoFunc func(req *http.Request) (*http.Response, error)
}

func (*MockHttpClient) Do

func (m *MockHttpClient) Do(req *http.Request) (*http.Response, error)

func (*MockHttpClient) SetCookies

func (m *MockHttpClient) SetCookies(_ *url.URL, _ []*http.Cookie)

Jump to

Keyboard shortcuts

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