utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPQueryBuild

func HTTPQueryBuild(params map[string]string) string

HTTPQueryBuild http_query_build

func QuerySortByKeyStr

func QuerySortByKeyStr(m map[string]string) (str string)

QuerySortByKeyStr sign (using buffer could be better than string)

func QuerySortByKeyStr2

func QuerySortByKeyStr2(params map[string]string) (str string)

QuerySortByKeyStr2 query sort by key str2

func SortByKey

func SortByKey(m map[string]string) (str []string)

SortByKey sort by key

Types

type HTTPClient

type HTTPClient struct {
	Client   *http.Client
	Response *http.Response
}

HTTPClient http's client

func (*HTTPClient) GetResponseByte

func (c *HTTPClient) GetResponseByte() (body []byte, err error)

GetResponseByte get response byte

func (*HTTPClient) GetResponseJSON

func (c *HTTPClient) GetResponseJSON(response interface{}) error

GetResponseJSON get response json

func (*HTTPClient) HTTPGet

func (c *HTTPClient) HTTPGet(url string, params map[string]string) error

HTTPGet get method

func (*HTTPClient) HTTPPost

func (c *HTTPClient) HTTPPost(url string, params map[string]string) error

HTTPPost post string

func (*HTTPClient) HTTPPostJSON

func (c *HTTPClient) HTTPPostJSON(url, jsonStr string) error

HTTPPostJSON post json

Jump to

Keyboard shortcuts

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