Documentation ¶
Index ¶
- func ToBuffer(url string, callback BufferCallback) error
- func ToFile(url string, filename string) error
- func UploadFile(head api.Request, url string, file string) ([]byte, error)
- type BufferCallback
- type Http
- func (hp *Http) ConvertTo(data interface{}) url2.Values
- func (hp *Http) Do(method string, url string, body io.Reader, set SetHeaderFunc) ([]byte, error)
- func (hp *Http) DoBytes(method string, url string, buf []byte) ([]byte, error)
- func (hp *Http) DoForm(url string) ([]byte, error)
- func (hp *Http) DoFormWith(url, query string) ([]byte, error)
- func (hp *Http) DoFormWithValues(url string, values url2.Values) ([]byte, error)
- func (hp *Http) DoMultiForm(method, url string) ([]byte, error)
- func (hp *Http) DoMultiFormWith(method, url, query string) ([]byte, error)
- func (hp *Http) DoMultiFormWithValues(method, url string, form url2.Values) ([]byte, error)
- func (hp *Http) DoString(method string, url string, buf []byte) (string, error)
- func (hp *Http) DoWithHead(method string, url string, buf []byte, set SetHeaderFunc) ([]byte, error)
- func (hp *Http) FileName() string
- func (hp *Http) GetContentType() string
- func (hp *Http) IsFile() bool
- type SetHeaderFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToBuffer ¶
func ToBuffer(url string, callback BufferCallback) error
Types ¶
type BufferCallback ¶
type Http ¶
type Http struct { HttpStatus int ContentDisposition string ContentType string ContentLength int64 }
func (*Http) DoForm ¶ added in v0.2.6
DoForm url http://api.xxx.com/ssddd?key=ddd&ddd=sfsf
func (*Http) DoFormWith ¶ added in v0.2.6
DoFormWith query ssddd=sdsfs&sfssfs=sfsssfs&sfsfsfs&
func (*Http) DoFormWithValues ¶ added in v0.2.6
func (*Http) DoMultiForm ¶ added in v0.2.6
func (*Http) DoMultiFormWith ¶ added in v0.2.6
func (*Http) DoMultiFormWithValues ¶ added in v0.2.6
func (*Http) DoWithHead ¶
func (*Http) GetContentType ¶
type SetHeaderFunc ¶
Click to show internal directories.
Click to hide internal directories.