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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSha256

func GenerateSha256(key, data string) string

GenerateSha256 generate sha256

func HTTPQueryBuild

func HTTPQueryBuild(params map[string]string) string

HTTPQueryBuild http_query_build

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