Documentation ¶
Index ¶
- Constants
- type Request
- func (m *Request) AddCookie(cookie *http.Cookie)
- func (m *Request) AddFile(name, filename, path string)
- func (m *Request) AddHeader(key, value string)
- func (m *Request) AddParam(key, value string)
- func (m *Request) Exec() *Response
- func (m *Request) RemoveFile()
- func (m *Request) SetBody(body io.Reader)
- func (m *Request) SetContentType(contentType string)
- func (m *Request) SetHeader(key, value string)
- func (m *Request) SetHeaders(header http.Header)
- func (m *Request) SetParam(key, value string)
- func (m *Request) SetParams(params cmap.CMap)
- func (m *Request) SetStructParams(v interface{})
- type Response
Constants ¶
View Source
const ( GET = "GET" POST = "POST" DELETE = "DELETE" PUT = "PUT" PATCH = "PATCH" HEAD = "HEAD" OPTIONS = "OPTIONS" ContentTypeJSON = "application/json" ContentTypeForm = "application/x-www-form-urlencoded" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
Request Http Request
func (*Request) SetContentType ¶ added in v1.20.2
SetContentType 设定Content-Type
func (*Request) SetHeaders ¶ added in v1.20.2
SetHeaders 设定Header头
func (*Request) SetStructParams ¶ added in v1.20.2
func (m *Request) SetStructParams(v interface{})
SetStructParams struct to Params
Click to show internal directories.
Click to hide internal directories.