tools

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// http method
	HTTP_GET    = "GET"
	HTTP_POST   = "POST"
	HTTP_DELETE = "DELETE"

	// http default timeout
	HTTP_DEFAULT_TIMEOUT = 20 * time.Second
)

Variables

This section is empty.

Functions

func HttpReq

func HttpReq(tHttpParams *HttpParams) ([]byte, error)

Types

type HttpParams

type HttpParams struct {
	Method    string            `json:"Method"`
	ReqUrl    string            `json:"ReqUrl"`
	StrParams string            `json:"StrParams"`
	HeaderMap map[string]string `json:"HeaderMap"`
	Timeout   time.Duration     `json:"Timeout"`
}

func HttpParamsUnmarshal

func HttpParamsUnmarshal(data []byte) (*HttpParams, error)

Jump to

Keyboard shortcuts

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