Documentation ¶
Index ¶
- func NewFastClient(rwTimeout time.Duration)
- func Newh2cClient(rwTimeout time.Duration)
- type FastRequest
- func (fr *FastRequest) Delete() Request
- func (fr *FastRequest) Get() Request
- func (fr *FastRequest) Post() Request
- func (fr *FastRequest) Put() Request
- func (fr *FastRequest) SetBody(byts []byte) Request
- func (fr *FastRequest) SetContext(ctx context.Context) Request
- func (fr *FastRequest) SetHeader(key, value string) Request
- func (fr *FastRequest) SetJSONBody(obj interface{}) Request
- func (fr *FastRequest) SetParam(key string, value interface{}) Request
- func (fr *FastRequest) SkipBus() Request
- func (fr *FastRequest) ToBytes() (value []byte, r Response)
- func (fr *FastRequest) ToJSON(obj interface{}) (r Response)
- func (fr *FastRequest) ToString() (value string, r Response)
- func (fr *FastRequest) ToXML(v interface{}) (r Response)
- func (fr *FastRequest) URI() string
- type H2CRequest
- func (hr *H2CRequest) Delete() Request
- func (hr *H2CRequest) Get() Request
- func (hr *H2CRequest) Post() Request
- func (hr *H2CRequest) Put() Request
- func (hr *H2CRequest) SetBody(byts []byte) Request
- func (hr *H2CRequest) SetContext(ctx context.Context) Request
- func (hr *H2CRequest) SetHeader(key, value string) Request
- func (hr *H2CRequest) SetJSONBody(obj interface{}) Request
- func (hr *H2CRequest) SetParam(key string, value interface{}) Request
- func (hr *H2CRequest) SkipBus() Request
- func (hr *H2CRequest) ToBytes() (value []byte, r Response)
- func (hr *H2CRequest) ToJSON(obj interface{}) (r Response)
- func (hr *H2CRequest) ToString() (value string, r Response)
- func (hr *H2CRequest) ToXML(v interface{}) (r Response)
- func (hr *H2CRequest) URI() string
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FastRequest ¶
type FastRequest struct {
// contains filtered or unexported fields
}
FastRequest .
func (*FastRequest) SetContext ¶ added in v1.3.1
func (fr *FastRequest) SetContext(ctx context.Context) Request
SetContext .
func (*FastRequest) SetHeader ¶
func (fr *FastRequest) SetHeader(key, value string) Request
SetHeader .
func (*FastRequest) SetJSONBody ¶
func (fr *FastRequest) SetJSONBody(obj interface{}) Request
SetJSONBody .
func (*FastRequest) SetParam ¶
func (fr *FastRequest) SetParam(key string, value interface{}) Request
SetParam .
func (*FastRequest) ToString ¶
func (fr *FastRequest) ToString() (value string, r Response)
ToString .
type H2CRequest ¶
type H2CRequest struct {
// contains filtered or unexported fields
}
H2CRequest .
func (*H2CRequest) SetContext ¶ added in v1.3.1
func (hr *H2CRequest) SetContext(ctx context.Context) Request
SetContext .
func (*H2CRequest) SetHeader ¶
func (hr *H2CRequest) SetHeader(key, value string) Request
SetHeader .
func (*H2CRequest) SetJSONBody ¶
func (hr *H2CRequest) SetJSONBody(obj interface{}) Request
SetJSONBody .
func (*H2CRequest) SetParam ¶
func (hr *H2CRequest) SetParam(key string, value interface{}) Request
SetParam .
func (*H2CRequest) ToString ¶
func (hr *H2CRequest) ToString() (value string, r Response)
ToString .
type Request ¶
type Request interface { Post() Request Put() Request Get() Request Delete() Request SetJSONBody(obj interface{}) Request SetBody(byts []byte) Request //跳过总线数据,上下游header携带 SkipBus() Request ToJSON(obj interface{}) Response ToString() (string, Response) ToBytes() ([]byte, Response) ToXML(v interface{}) Response SetHeader(key, value string) Request SetParam(key string, value interface{}) Request URI() string SetContext(context.Context) Request }
Request .
func NewH2CRequest ¶
Click to show internal directories.
Click to hide internal directories.