net

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 1

README

net

Documentation

Index

Constants

View Source
const (
	CodeCreateRequestFailed int = 1
	CodeSendRequestFailed   int = 2
	CodeReadResponseFailed  int = 3
)

Public status

Variables

This section is empty.

Functions

func BindHeader

func BindHeader(log *logrus.Entry, r *http.Request, key string) (value string)

BindHeader func

func BindJSON

func BindJSON(log *logrus.Entry, r *http.Request, v interface{}) error

BindJSON bind and debug data

func BindRawData

func BindRawData(log *logrus.Entry, r *http.Request) (body []byte, err error)

BindRawData func

func Curl

func Curl(method, url string, body []byte, header map[string][]string, timeout time.Duration) (code int, contentType string, buff []byte, err error)

Curl tool

func DefaultQuery

func DefaultQuery(log *logrus.Entry, r *http.Request, key, def string) string

DefaultQuery query and debug data

func SetRawLog

func SetRawLog(path string)

SetRawLog ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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