Releases: monaco-io/request
Releases · monaco-io/request
v1.0.16
fix panic on nil response
Fix panic on failed response (#24) Co-authored-by: qwerty <[email protected]>
feature: support go version < 1.16
feature: support go version < 1.16 (#22) * upgrade package version to v1.0.13 * support go version < 1.16
support context
tls bug fix
fix Request.AddTLSConfig method (#16) Co-authored-by: sedmess <>
feat: support generate curl
feat: support generate curl command (#13) * feat: mutipart form data * fix typo * update readme * feat: mutipart form data * feat: generate curl command * feat: generate curl command * update doc * clean code
feat: mutipart form data
feat: mutipart form data (#11) * feat: mutipart form data * fix typo
default utf-8 encode, support sorted header
v1.0.9 feat: sorted header
step by step to build request
v1.0.8 feat: http trace & request benchmark
refactor released
// Client Method
/*
Method = "OPTIONS" ; Section 9.2
| "GET" ; Section 9.3
| "HEAD" ; Section 9.4
| "POST" ; Section 9.5
| "PUT" ; Section 9.6
| "DELETE" ; Section 9.7
| "TRACE" ; Section 9.8
| "CONNECT" ; Section 9.9
| extension-method
extension-method = token
token = 1*<any CHAR except CTLs or separators>
*/
type Client struct {
// URL http request url like: https://www.google.com
URL string
// Method http method GET/POST/POST/DELETE ...
Method string
// Header http header
Header map[string]string
// Query params on http url
Query map[string]string
// JSON body as json string/bytes/struct
JSON interface{}
// XML body as xml string/bytes/struct
XML interface{}
// XML body as string
String string
// WWWForm TODO
WWWForm interface{}
// BasicAuth http basic auth with username and password
BasicAuth BasicAuth
// CustomerAuth add Authorization xxx to header
CustomerAuth string
// CustomerAuth add Authorization bearer xxx to header
Bearer string
// Timeout http request timeout
Timeout time.Duration
// TLSTimeout tls timeout
TLSTimeout time.Duration
// DialTimeout dial timeout
DialTimeout time.Duration
// ProxyURL proxy url
ProxyURL string
// Define the proxy function to be used during the transport
ProxyServers map[string]string
// Cookies original http cookies
Cookies []*http.Cookie
// CookiesMap add cookies as map
CookiesMap map[string]string
// TLSConfig tls config on transport
TLSConfig *tls.Config
// Transport http transport
Transport *http.Transport
}