Documentation
¶
Overview ¶
* @Author: your name * @Date: 2021-03-24 11:32:44 * @LastEditTime: 2021-06-23 11:29:31 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \socloud-servere:\wuhuarou\renlanglang\zzsd\tools\pkg\client\client.go
Index ¶
- Constants
- type Client
- func (client *Client) Delete(ctx context.Context, requestURL string) (*http.Response, error)
- func (client *Client) Get(ctx context.Context, requestURL string) (*http.Response, error)
- func (client *Client) Post(ctx context.Context, requestURL string, requestBody interface{}) (*http.Response, error)
- func (Client *Client) PostForm(ctx context.Context, requestURL string, requestBody string) (*http.Response, error)
- func (client *Client) Put(ctx context.Context, requestURL string, requestBody interface{}) (*http.Response, error)
- type HttpClient
- type OptionClient
Constants ¶
View Source
const ( ContentType = "Content-Type" ContentJson = "application/json" ContentFrom = "application/x-www-form-urlencoded;charset=utf-8" User_Agent = "" /* 127-byte string literal not displayed */ Accept = "text/html, application/xhtml+xml, image/jxr, */*" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
type OptionClient ¶
type OptionClient interface {
Apply(*HttpClient)
}
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) OptionClient
func WithTimeOut ¶
func WithTimeOut(timeout time.Duration) OptionClient
Click to show internal directories.
Click to hide internal directories.