httpclient

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 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 HttpClient

type HttpClient struct {
	http.Client
}

func (HttpClient) EnableCookieJar

func (client HttpClient) EnableCookieJar() HttpClient

EnableCookieJar 开启HttpClient Cookie管理

func (HttpClient) Execute

func (client HttpClient) Execute(r *http.Request) (*http.Response, []byte, error)

func (HttpClient) Get

func (client HttpClient) Get(url string, requestHeader map[string]string) (*http.Response, []byte, error)

func (HttpClient) GetJson

func (client HttpClient) GetJson(url string, requestHeader map[string]string, v any) error

func (HttpClient) Post

func (client HttpClient) Post(url string, reqBody io.Reader, requestHeader map[string]string) (*http.Response, []byte, error)

func (HttpClient) PostForm

func (client HttpClient) PostForm(url string, formData, fileData, requestHeader map[string]string) (*http.Response, []byte, error)

func (HttpClient) PostFormJson

func (client HttpClient) PostFormJson(url string, formData, fileData, requestHeader map[string]string, v any) error

func (HttpClient) PostJson

func (client HttpClient) PostJson(url string, reqBody io.Reader, requestHeader map[string]string, v any) error

func (HttpClient) SetProxyUrl

func (client HttpClient) SetProxyUrl(rawURL string) HttpClient

Jump to

Keyboard shortcuts

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