Documentation ¶
Index ¶
- type CSBClient
- func (c *CSBClient) Do(ctx context.Context, result interface{}) (*req.Response, error)
- func (c *CSBClient) SetApiMethod(apiMethod string) *CSBClient
- func (c *CSBClient) SetApiName(apiName string) *CSBClient
- func (c *CSBClient) SetApiVersion(apiVersion string) *CSBClient
- func (c *CSBClient) SetBody(body []byte) *CSBClient
- func (c *CSBClient) SetContentType(contentType string) *CSBClient
- func (c *CSBClient) SetFormParam(formParam map[string]string) *CSBClient
- func (c *CSBClient) SetHeaders(headers map[string]string) *CSBClient
- func (c *CSBClient) SetQueryParam(queryParam map[string]string) *CSBClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSBClient ¶
type CSBClient struct { ApiName string // 接口名称 ApiMethod string // 接口请求方法 ApiVersion string // 接口版本 ContentType string // 请求的content-type Headers map[string]string // 请求头 QueryParam map[string]string // query参数 FormParam map[string]string // 表单数据 Body []byte // 请求体,文件、表单、JSON等 // contains filtered or unexported fields }
CSBClient CSBClient
func NewCSBClient ¶
NewCSBClient 返回新的CSB客户端
func (*CSBClient) SetApiMethod ¶
SetApiMethod 设置请求接口的方法,只支持get或post
func (*CSBClient) SetApiName ¶
SetApiName 设置请求接口的名称
func (*CSBClient) SetApiVersion ¶
SetApiVersion 设置请求接口的版本
func (*CSBClient) SetContentType ¶
SetContentType 设置请求content-type
func (*CSBClient) SetFormParam ¶
SetFormParam 设置表单数据
func (*CSBClient) SetHeaders ¶
SetHeaders 设置请求头
Click to show internal directories.
Click to hide internal directories.