cfrt

package
v0.0.0-...-4c29d23 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// UserAgent is the default user agent used by HTTP requests.
	UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RoundTripper

type RoundTripper struct {
	// contains filtered or unexported fields
}

RoundTripper is a http client RoundTripper that can handle the Cloudflare anti-bot.

func New

func New(upstream http.RoundTripper) (*RoundTripper, error)

New wraps a http client transport with one that can handle the Cloudflare anti-bot.

func (RoundTripper) RoundTrip

func (rt RoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface for the Transport type.

Jump to

Keyboard shortcuts

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