client

package
v0.0.0-...-a5c2be1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CharsetUtf8     = "utf8"
	ContentTypeJSON = "application/json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client client

func NewClient

func NewClient(httpClient *http.Client, withoutTime int) Client

NewClient new client

func (Client) Do

func (c Client) Do(req *http.Request) ([]byte, error)

Do do transport

func (Client) GetHttpClient

func (c Client) GetHttpClient() *http.Client

GetHttpClient get http_client

func (Client) GetWithoutTime

func (c Client) GetWithoutTime() time.Duration

GetWithoutTime get without time

func (Client) JSONGet

func (c Client) JSONGet(turl string) ([]byte, error)

func (Client) JSONPost

func (c Client) JSONPost(turl string, param interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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