net

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpDumpRequest

func HttpDumpRequest(request *http.Request) []byte

func HttpDumpResponse

func HttpDumpResponse(response *http.Response) []byte

Types

type HttpClient

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

func NewHttpClient

func NewHttpClient(client *http.Client) *HttpClient

func (*HttpClient) AddFormData

func (c *HttpClient) AddFormData(key string, value string) *HttpClient

func (*HttpClient) AddParams

func (c *HttpClient) AddParams(key string, value string) *HttpClient

func (*HttpClient) Clone

func (c *HttpClient) Clone() *HttpClient

func (*HttpClient) Debug

func (c *HttpClient) Debug(output *os.File) *HttpClient

func (*HttpClient) End

func (c *HttpClient) End() (resp *http.Response, body []byte, err error)

func (*HttpClient) EndStruct

func (c *HttpClient) EndStruct(value any, callbacks ...func(*http.Response) error) error

func (*HttpClient) Get

func (c *HttpClient) Get(uri string) *HttpClient

func (*HttpClient) Post

func (c *HttpClient) Post(uri string) *HttpClient

func (*HttpClient) Put

func (c *HttpClient) Put(uri string) *HttpClient

func (*HttpClient) SendBody

func (c *HttpClient) SendBody(body io.Reader) *HttpClient

func (*HttpClient) SetContentType

func (c *HttpClient) SetContentType(contentType string) *HttpClient

func (*HttpClient) SetCookies

func (c *HttpClient) SetCookies(cookies []*http.Cookie) *HttpClient

func (*HttpClient) SetHeader

func (c *HttpClient) SetHeader(key string, value string) *HttpClient

func (*HttpClient) SetParams

func (c *HttpClient) SetParams(key string, value string) *HttpClient

func (*HttpClient) SetUserAgent

func (c *HttpClient) SetUserAgent(ua string) *HttpClient

func (*HttpClient) SetWbiKey added in v0.2.6

func (c *HttpClient) SetWbiKey(wbiKey string) *HttpClient

Jump to

Keyboard shortcuts

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