ownhttp

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *http.Client

New returns a new http.Client with the AddHeaderTransport (setting the User-Agent header)

Types

type AddHeaderTransport

type AddHeaderTransport struct {
	T http.RoundTripper
}

func NewAddHeaderTransport

func NewAddHeaderTransport(T http.RoundTripper) *AddHeaderTransport

func (*AddHeaderTransport) RoundTrip

func (adt *AddHeaderTransport) RoundTrip(req *http.Request) (*http.Response, error)

type ThrottleTransport added in v0.1.14

type ThrottleTransport struct {
	T http.RoundTripper
	// contains filtered or unexported fields
}

func NewThrottleTransport added in v0.1.14

func NewThrottleTransport(T http.RoundTripper, limiter *rate.Limiter) *ThrottleTransport

func (*ThrottleTransport) RoundTrip added in v0.1.14

func (tt *ThrottleTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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