Skip to content

Releases: monaco-io/request

v1.0.16

02 Jul 13:37
8425841
Compare
Choose a tag to compare
Feat/context deadline (#28)

* upgrade dep

* rename ctx to xctx

* refactor is valid

* refactor timeout

* remove trace do

---------

Co-authored-by: 卢旭泽(Diluc.L) <xuze.lu@mihoyo.com>

fix panic on nil response

03 Oct 02:28
724b00d
Compare
Choose a tag to compare
Fix panic on failed response (#24)

Co-authored-by: qwerty <qwerty2@students.zcu.cz>

feature: support go version < 1.16

11 Jun 08:51
64f9f35
Compare
Choose a tag to compare
feature: support go version < 1.16 (#22)

* upgrade package version to v1.0.13

* support go version < 1.16

support context

03 May 08:50
97ef72d
Compare
Choose a tag to compare
support context Pre-release
Pre-release

image

tls bug fix

16 Mar 07:27
ffc26ac
Compare
Choose a tag to compare
fix Request.AddTLSConfig method (#16)

Co-authored-by: sedmess <>

feat: support generate curl

15 Mar 11:52
cede9bd
Compare
Choose a tag to compare
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

15 Mar 09:06
8254484
Compare
Choose a tag to compare
feat: mutipart form data (#11)

* feat: mutipart form data

* fix typo

default utf-8 encode, support sorted header

09 Feb 07:08
Compare
Choose a tag to compare
v1.0.9

feat: sorted header

step by step to build request

06 Feb 08:38
Compare
Choose a tag to compare
v1.0.8

feat: http trace & request benchmark

refactor released

17 Jan 03:19
60b7ea1
Compare
Choose a tag to compare
// 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
}