http

package
v1.41.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: OSL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default_Client = Client{
	Client: http.Client{
		CheckRedirect: func(*Request, []*Request) error {
			return http.ErrUseLastResponse
		},
	},
	Level:  1,
	Status: http.StatusOK,
}

Functions

This section is empty.

Types

type Client

type Client struct {
	http.Client
	Level  int // this needs to work with flag.IntVar
	Status int
}

func (Client) Do

func (c Client) Do(req *Request) (*http.Response, error)

func (Client) Get

func (c Client) Get(addr string) (*http.Response, error)

func (Client) WithLevel

func (c Client) WithLevel(level int) Client

func (Client) WithRedirect

func (c Client) WithRedirect() Client

func (Client) WithStatus

func (c Client) WithStatus(status int) Client

func (Client) WithTransport

func (c Client) WithTransport(tr *Transport) Client

type Request

type Request = http.Request

func Read_Request

func Read_Request(in io.Reader) (*Request, error)

type Transport

type Transport = http.Transport

Jump to

Keyboard shortcuts

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