Documentation ¶
Index ¶
- Constants
- type Auth
- type Cookies
- type FormData
- type FormKV
- type Headers
- type HttpClient
- func (h *HttpClient) Connect(url string, opts ...interface{}) (*MiniResponse, error)
- func (h *HttpClient) Delete(url string, opts ...interface{}) (*MiniResponse, error)
- func (h *HttpClient) Get(url string, opts ...interface{}) (*MiniResponse, error)
- func (h *HttpClient) Head(url string, opts ...interface{}) (*MiniResponse, error)
- func (h *HttpClient) Options(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)
- func (h *HttpClient) Trace(url string, opts ...interface{}) (*MiniResponse, error)
- type JSONData
- type MiniResponse
- 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 ¶
type HttpClient struct { Method string // Request Method NoRedirect bool // Turn off automatic redirection Socks5Address string // Set socks5 proxy SkipVerify bool // Skip verify Timeout int // Request timeout }
func NewClient ¶
func NewClient() *HttpClient
func (*HttpClient) Connect ¶ added in v2.0.8
func (h *HttpClient) Connect(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Delete ¶
func (h *HttpClient) Delete(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Get ¶
func (h *HttpClient) Get(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Head ¶ added in v2.0.8
func (h *HttpClient) Head(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Options ¶ added in v2.0.8
func (h *HttpClient) Options(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Patch ¶
func (h *HttpClient) Patch(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Post ¶
func (h *HttpClient) Post(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Put ¶
func (h *HttpClient) Put(url string, opts ...interface{}) (*MiniResponse, error)
func (*HttpClient) Request ¶
func (h *HttpClient) Request(url string, opts ...interface{}) (*MiniResponse, error)
Request Universal client
func (*HttpClient) Trace ¶ added in v2.0.8
func (h *HttpClient) Trace(url string, opts ...interface{}) (*MiniResponse, error)
type MiniResponse ¶ added in v2.0.7
func (*MiniResponse) RawData ¶ added in v2.0.7
func (res *MiniResponse) RawData() ([]byte, error)
RawData bytes data
func (*MiniResponse) RawJSON ¶ added in v2.0.7
func (res *MiniResponse) RawJSON() (interface{}, error)
RawJSON JSON data
func (*MiniResponse) RawNumJSON ¶ added in v2.0.7
func (res *MiniResponse) RawNumJSON() (interface{}, error)
RawNumJSON JSON data with real number
Click to show internal directories.
Click to hide internal directories.