Documentation ¶
Index ¶
- Constants
- type Request
- func (m *Request) AddCookie(cookie *http.Cookie) *Request
- func (m *Request) AddFile(name, filename, path string) *Request
- func (m *Request) AddHeader(key, value string) *Request
- func (m *Request) AddParam(key, value string) *Request
- func (m *Request) Exec() *Response
- func (m *Request) RemoveFile() *Request
- func (m *Request) SetBody(body io.Reader) *Request
- func (m *Request) SetContentType(contentType string) *Request
- func (m *Request) SetHeader(key, value string) *Request
- func (m *Request) SetHeaders(header http.Header) *Request
- func (m *Request) SetParam(key, value string) *Request
- func (m *Request) SetParams(params cmap.CMap) *Request
- func (m *Request) SetStructParams(v interface{}) *Request
- type Response
Constants ¶
View Source
const ( GET = http.MethodGet POST = http.MethodPost DELETE = http.MethodDelete PUT = http.MethodPut PATCH = http.MethodPatch HEAD = http.MethodHead OPTIONS = http.MethodOptions 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 ¶
SetContentType 设定Content-Type
func (*Request) SetHeaders ¶
SetHeaders 设定Header头
func (*Request) SetStructParams ¶
SetStructParams struct to Params
Click to show internal directories.
Click to hide internal directories.