request

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

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

func New

func New() *Request

func (*Request) Addr

func (r *Request) Addr(addr string) *Request

func (*Request) Body

func (r *Request) Body(content []byte) *Request

func (*Request) Do

func (r *Request) Do() (*Response, error)

func (*Request) HTTP

func (r *Request) HTTP() *Request

func (*Request) HTTPHeaders

func (r *Request) HTTPHeaders(headers map[string]string) *Request

func (*Request) HTTPHost

func (r *Request) HTTPHost(host string) *Request

func (*Request) HTTPParams

func (r *Request) HTTPParams(method, host, path string, headers map[string]string) *Request

func (*Request) HTTPPath

func (r *Request) HTTPPath(path string) *Request

func (*Request) HTTPS

func (r *Request) HTTPS() *Request

func (*Request) Port

func (r *Request) Port(port int) *Request

func (*Request) Protocol

func (r *Request) Protocol(protocol string) *Request

func (*Request) Proxy

func (r *Request) Proxy(url string) *Request

func (*Request) TCP

func (r *Request) TCP() *Request

func (*Request) TLSConfig

func (r *Request) TLSConfig(tlsConfig *tls.Config) *Request

func (*Request) Timeout

func (r *Request) Timeout(timeout time.Duration) *Request

func (*Request) UDP

func (r *Request) UDP() *Request

type Response

type Response struct {
	Code    int
	Header  http.Header
	Content []byte
}

Jump to

Keyboard shortcuts

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