httpclient

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Code    int64  `json:"code"`
	Message string `json:"msg"`
}

type HTTPClient

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

func NewHTTPClient

func NewHTTPClient() *HTTPClient

func (*HTTPClient) DoRequest

func (c *HTTPClient) DoRequest(url, method string, body []byte, header *fasthttp.RequestHeader) ([]byte, error)

func (*HTTPClient) Get

func (c *HTTPClient) Get(url string) []byte

func (*HTTPClient) GetWithHeader

func (c *HTTPClient) GetWithHeader(url string, header map[string]string) []byte

func (*HTTPClient) Post

func (c *HTTPClient) Post(url string, body []byte) []byte

func (*HTTPClient) PostWithHeader

func (c *HTTPClient) PostWithHeader(url string, body []byte, header map[string]string) []byte

Jump to

Keyboard shortcuts

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