Documentation
¶
Index ¶
- type Net
- type SuperAgent
- func (s *SuperAgent) End(ctx context.Context, v interface{}) (*http.Response, error)
- func (s *SuperAgent) Header(header map[string]string) *SuperAgent
- func (s *SuperAgent) JSON(body interface{}) *SuperAgent
- func (s *SuperAgent) Text(body string) *SuperAgent
- func (s *SuperAgent) XML(body interface{}) *SuperAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Net ¶
type Net struct {
// contains filtered or unexported fields
}
Net 请求结构体
func NewWithClient ¶
NewWithClient 初始化一个请求包对象,自己传入Client
type SuperAgent ¶
type SuperAgent struct {
// contains filtered or unexported fields
}
SuperAgent 请求参数
func (*SuperAgent) Header ¶
func (s *SuperAgent) Header(header map[string]string) *SuperAgent
Header 设置请求头内容
func (*SuperAgent) JSON ¶
func (s *SuperAgent) JSON(body interface{}) *SuperAgent
JSON 设置请求数据内容,默认用 Content-Type=application/json; 方式发送json数据
func (*SuperAgent) Text ¶
func (s *SuperAgent) Text(body string) *SuperAgent
Text 设置请求数据内容,默认用 Content-Type=text/plain; 方式发送string数据
func (*SuperAgent) XML ¶
func (s *SuperAgent) XML(body interface{}) *SuperAgent
XML 设置请求数据内容,默认用 Content-Type=application/json; 方式发送json数据
Click to show internal directories.
Click to hide internal directories.