http

package
v0.0.0-...-e809a50 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client 客户端

func NewClient

func NewClient() *Client

NewClient 创建新 Client

func (*Client) Get

func (c *Client) Get(url string) ([]byte, error)

Get 发送GET请求

func (*Client) Post

func (c *Client) Post(url string, requestBody string) ([]byte, error)

Post 发送POST请求

func (*Client) SetCert

func (c *Client) SetCert(crt, key, ca []byte) (err error)

SetCert 设置证书

func (*Client) SetHeader

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

SetHeader 设置header

func (*Client) SetTimeout

func (c *Client) SetTimeout(duration time.Duration)

SetTimeout 设置超时时间

Jump to

Keyboard shortcuts

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