Documentation
¶
Overview ¶
Package request 提供Tigo框架自带的http client功能,此包包含发送http请求的方法。
Index ¶
- type HttpClient
- type Response
- func Delete(requestUrl string, headers ...map[string]string) (*Response, error)
- func Get(requestUrl string, headers ...map[string]string) (*Response, error)
- func Head(requestUrl string, headers ...map[string]string) (*Response, error)
- func Options(requestUrl string, headers ...map[string]string) (*Response, error)
- func Patch(requestUrl string, postParams map[string]interface{}, ...) (*Response, error)
- func Post(requestUrl string, postParams map[string]interface{}, ...) (*Response, error)
- func Put(requestUrl string, postParams map[string]interface{}, ...) (*Response, error)
- func Request(method string, requestUrl string, postParams map[string]interface{}, ...) (*Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
Response 自定义Http的Response
func Patch ¶
func Patch(requestUrl string, postParams map[string]interface{}, headers ...map[string]string) (*Response, error)
Patch 向指定url发送patch请求
func Post ¶
func Post(requestUrl string, postParams map[string]interface{}, headers ...map[string]string) (*Response, error)
Post 向指定url发送post请求
func Put ¶
func Put(requestUrl string, postParams map[string]interface{}, headers ...map[string]string) (*Response, error)
Put 向指定url发送put请求
func Request ¶
func Request(method string, requestUrl string, postParams map[string]interface{}, headers ...map[string]string) (*Response, error)
Request 发送指定的Request请求
func (*Response) ToContentStr ¶
ToContentStr 将Response实例的Content转换为字符串
Click to show internal directories.
Click to hide internal directories.