http

package
v1.41.3 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(*http.Request, []*http.Request) error {
			return http.ErrUseLastResponse
		},
	},
	Level:  1,
	Status: http.StatusOK,
}
View Source
var NewRequest = http.NewRequest

Functions

func Read_Request

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

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 *http.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 *http.Transport) Client
type Header = http.Header

type Request

type Request = http.Request

type Transport

type Transport = http.Transport

Jump to

Keyboard shortcuts

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