Documentation ¶
Index ¶
- Constants
- func BindHeader(log *logrus.Entry, r *http.Request, key string) (value string)
- func BindJSON(log *logrus.Entry, r *http.Request, v interface{}) error
- func BindRawData(log *logrus.Entry, r *http.Request) (body []byte, err error)
- func Curl(method, url string, body []byte, header map[string][]string, ...) (code int, contentType string, buff []byte, err error)
- func DefaultQuery(log *logrus.Entry, r *http.Request, key, def string) string
- func SetRawLog(path string)
Constants ¶
View Source
const ( CodeCreateRequestFailed int = 1 CodeSendRequestFailed int = 2 CodeReadResponseFailed int = 3 )
Public status
Variables ¶
This section is empty.
Functions ¶
func BindHeader ¶
BindHeader func
func BindRawData ¶
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 ¶
DefaultQuery query and debug data
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.