Documentation ¶
Index ¶
- func SetUrlBuild(urls string, data map[string]string) string
- type HttpSend
- func (h *HttpSend) Connect(url string) (result []byte, err error)
- func (h *HttpSend) Debug(debug ...bool) *HttpSend
- func (h *HttpSend) Delete(url string) (result []byte, err error)
- func (h *HttpSend) Get(url string) (result []byte, err error)
- func (h *HttpSend) Head(url string) (result []byte, err error)
- func (h *HttpSend) Options(url string) (result []byte, err error)
- func (h *HttpSend) Patch(url string) (result []byte, err error)
- func (h *HttpSend) Post(url string) (result []byte, err error)
- func (h *HttpSend) PostForm(url string) (result []byte, err error)
- func (h *HttpSend) PostFormFile(url, files string) (body []byte, err error)
- func (h *HttpSend) Put(url string) (result []byte, err error)
- func (h *HttpSend) Send() (body []byte, err error)
- func (h *HttpSend) SendForm() (body []byte, err error)
- func (h *HttpSend) SetBody(body map[string]interface{}) *HttpSend
- func (h *HttpSend) SetBodyReader(BodyReader io.Reader) *HttpSend
- func (h *HttpSend) SetClient(client *http.Client) *HttpSend
- func (h *HttpSend) SetContentType(ContentType string) *HttpSend
- func (h *HttpSend) SetCookie(cookies map[string]string) *HttpSend
- func (h *HttpSend) SetFile(file string, key ...string) *HttpSend
- func (h *HttpSend) SetFileKey(fileKey string) *HttpSend
- func (h *HttpSend) SetFileKeyAndName(fileKey, fileName string) *HttpSend
- func (h *HttpSend) SetFileName(fileName string) *HttpSend
- func (h *HttpSend) SetFiles(files []string) *HttpSend
- func (h *HttpSend) SetHeader(header map[string]string) *HttpSend
- func (h *HttpSend) SetMethod(method string) *HttpSend
- func (h *HttpSend) SetTimeout(timeout time.Duration) *HttpSend
- func (h *HttpSend) SetTransport(transport *http.Transport) *HttpSend
- func (h *HttpSend) SetUrl(url string) *HttpSend
- func (h *HttpSend) Trace(url string) (result []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpSend ¶
type HttpSend struct { Client *http.Client //Client Response *http.Response //Response Url string //Request address<请求地址> ContentType string //Request type<网络文件的类型> Header map[string]string //Request header<请求头> Cookies map[string]string //Request Cookies<请求Cookies> Timeout time.Duration //Request timeout<请求超时时间> Body map[string]interface{} //Request body<请求体> Method string //Request method<请求类型> Files []string //Request Files <多个文件> File string //Request File <单个文件> FileKey string //Request FileKey<文件Key> FileName string //Request FileName<文件名称> BodyReader io.Reader //Request BodyReader<读取器> Err error StatusCode int // contains filtered or unexported fields }
HttpSend Request parameter
func (*HttpSend) PostFormFile ¶ added in v1.2.8
PostFormFile Request file byte stream<请求文件字节流>
func (*HttpSend) SetBodyReader ¶ added in v1.3.0
SetBodyReader Set body<设置读取器>
func (*HttpSend) SetContentType ¶ added in v1.2.8
SetContentType Set Type<设置资源的MIME类型>
func (*HttpSend) SetFileKey ¶ added in v1.2.8
SetFileKey Set File<设置文件的Key>
func (*HttpSend) SetFileKeyAndName ¶ added in v1.2.8
SetFileKeyAndName Set File<设置文件Key和名称>
func (*HttpSend) SetFileName ¶ added in v1.2.8
SetFileName Set File<设置文件的名称>
func (*HttpSend) SetTimeout ¶
SetTimeout Set Timeout<设置超时>
func (*HttpSend) SetTransport ¶ added in v1.5.2
SetTransport <设置http.Transport>
Click to show internal directories.
Click to hide internal directories.