Documentation ¶
Index ¶
- type Req
- func (req *Req) BasicAuth(username, password string) *Req
- func (req *Req) Body(body io.Reader) *Req
- func (req *Req) ContentType(value string) *Req
- func (req *Req) Header(key, value string) *Req
- func (req *Req) Headers(values map[string]string) *Req
- func (req *Req) Json(struc interface{}) *Req
- func (req *Req) Param(key, value string) *Req
- func (req *Req) Params(values map[string]string) *Req
- func (req *Req) ParamsStruct(value interface{}) *Req
- func (req *Req) Query(key, value string) *Req
- func (req *Req) QueryStruct(value interface{}) *Req
- func (req *Req) Querys(values map[string]string) *Req
- func (req *Req) Raw() *http.Request
- func (req *Req) Send() (*Res, error)
- type Res
- type Rest
- func (r *Rest) After(fn func(res *Res)) *Rest
- func (r *Rest) BaseUrl(url string) *Rest
- func (r *Rest) Before(fn func(req *Req)) *Rest
- func (r *Rest) Connect(path string) *Req
- func (r *Rest) Delete(path string) *Req
- func (r *Rest) Get(path string) *Req
- func (r *Rest) Head(path string) *Req
- func (r *Rest) Options(path string) *Req
- func (r *Rest) Post(path string) *Req
- func (r *Rest) Put(path string) *Req
- func (r *Rest) Trace(path string) *Req
- func (r *Rest) UserAgent(value string) *Rest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Req ¶
type Req struct {
// contains filtered or unexported fields
}
func (*Req) ContentType ¶
func (*Req) ParamsStruct ¶
func (*Req) QueryStruct ¶
Click to show internal directories.
Click to hide internal directories.