Documentation ¶
Index ¶
- Variables
- func CallRet(ctx context.Context, ret interface{}, resp *http.Response) (err error)
- func ResponseError(resp *http.Response) error
- func TurnOnDebug()
- type Client
- func (r Client) CallWith64(ctx context.Context, ret interface{}, method, reqUrl string, ...) (err error)
- func (r Client) CallWithJson(ctx context.Context, ret interface{}, method, reqUrl string, ...) (err error)
- func (r Client) Do(ctx context.Context, req *http.Request) (resp *http.Response, err error)
- func (r Client) DoRequestWith(ctx context.Context, method, reqUrl string, headers http.Header, ...) (resp *http.Response, err error)
- func (r Client) DoRequestWith64(ctx context.Context, method, reqUrl string, headers http.Header, ...) (resp *http.Response, err error)
- func (r Client) DoRequestWithJson(ctx context.Context, method, reqUrl string, headers http.Header, ...) (resp *http.Response, err error)
- type ErrorInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var DebugMode = false
DebugMode 用来打印调试信息
View Source
var DeepDebugInfo = false
DeepDebugInfo 调试信息
View Source
var DefaultClient = Client{&http.Client{Transport: http.DefaultTransport}}
DefaultClient 默认Client
View Source
var UserAgent = "Golang douyin/client package"
UserAgent UA
Functions ¶
Types ¶
type Client ¶
Client 负责发送HTTP请求到抖音接口服务器
func (Client) CallWith64 ¶
func (r Client) CallWith64(ctx context.Context, ret interface{}, method, reqUrl string, headers http.Header, body io.Reader, bodyLength int64) (err error)
CallWith64 请求
func (Client) CallWithJson ¶
func (r Client) CallWithJson(ctx context.Context, ret interface{}, method, reqUrl string, headers http.Header, param interface{}) (err error)
CallWithJson JSON请求
func (Client) DoRequestWith ¶
func (r Client) DoRequestWith(ctx context.Context, method, reqUrl string, headers http.Header, body io.Reader, bodyLength int) (resp *http.Response, err error)
DoRequestWith 请求
Click to show internal directories.
Click to hide internal directories.