httpclient

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiResult

type ApiResult struct {
	ErrorCode int         `json:"errorCode"`
	Msg       string      `json:"msg"`
	Result    interface{} `json:"result"`
}

func (ApiResult) GetHead

func (ar ApiResult) GetHead() (int, string)

func (ApiResult) GetResult

func (ar ApiResult) GetResult(res interface{}) error

func (ApiResult) IsSuccess

func (ar ApiResult) IsSuccess() bool

type HttpClient

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

func NewClient

func NewClient(url string, skipVerify, verbose bool) (*HttpClient, error)

func (*HttpClient) Get

func (c *HttpClient) Get(path, body string, headers, params map[string]string) (*[]byte, error)

func (*HttpClient) GetD

func (c *HttpClient) GetD(path, body string, headers, params map[string]string, result interface{}) error

func (*HttpClient) Post

func (c *HttpClient) Post(path, body string, headers, params map[string]string) (*[]byte, error)

func (*HttpClient) PostD

func (c *HttpClient) PostD(path, body string, headers, params map[string]string, result interface{}) error

Jump to

Keyboard shortcuts

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