useragent

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomUserAgentTransport

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

CustomUserAgentTransport is a http.RoundTripper that ensures that a custom user-agent string is set for each request

func NewCustomUserAgentTransport

func NewCustomUserAgentTransport(baseTransport http.RoundTripper, userAgent string) *CustomUserAgentTransport

NewCustomUserAgentTransport creates a new http transport that sets a custom user-agent string for each request

func (*CustomUserAgentTransport) RoundTrip

func (t *CustomUserAgentTransport) 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