Documentation ¶
Index ¶
- Constants
- type Auth
- type Cookies
- type FormData
- type FormKV
- type Headers
- type HttpClient
- func (h *HttpClient) Delete(url string, opts ...interface{}) (*miniResponse, error)
- func (h *HttpClient) Get(url string, opts ...interface{}) (*miniResponse, error)
- func (h *HttpClient) Patch(url string, opts ...interface{}) (*miniResponse, error)
- func (h *HttpClient) Post(url string, opts ...interface{}) (*miniResponse, error)
- func (h *HttpClient) Put(url string, opts ...interface{}) (*miniResponse, error)
- func (h *HttpClient) Request(url string, opts ...interface{}) (*miniResponse, error)
- type JSONData
- type Params
Constants ¶
View Source
const DefaultUA = "MiniRequest/" + DefaultVer
DefaultUA Default User-Agent
View Source
const DefaultVer = "2.0.0"
DefaultVer Library version
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶ added in v2.0.1
type HttpClient struct { Method string // Request Method NoRedirect bool // Turn off automatic redirection Socks5Address string // Set socks5 proxy Timeout int // Request timeout }
func NewClient ¶
func NewClient() *HttpClient
func (*HttpClient) Delete ¶ added in v2.0.1
func (h *HttpClient) Delete(url string, opts ...interface{}) (*miniResponse, error)
func (*HttpClient) Get ¶ added in v2.0.1
func (h *HttpClient) Get(url string, opts ...interface{}) (*miniResponse, error)
func (*HttpClient) Patch ¶ added in v2.0.1
func (h *HttpClient) Patch(url string, opts ...interface{}) (*miniResponse, error)
func (*HttpClient) Post ¶ added in v2.0.1
func (h *HttpClient) Post(url string, opts ...interface{}) (*miniResponse, error)
func (*HttpClient) Put ¶ added in v2.0.1
func (h *HttpClient) Put(url string, opts ...interface{}) (*miniResponse, error)
func (*HttpClient) Request ¶ added in v2.0.1
func (h *HttpClient) Request(url string, opts ...interface{}) (*miniResponse, error)
Request Universal client
Click to show internal directories.
Click to hide internal directories.