Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertTo(data interface{}) url.Values
- func Download(url string, filename string, perm os.FileMode) error
- func Upload(url string, filename string, headerFunc HeaderFunc) ([]byte, error)
- func UploadV2(url string, form Form, headerFunc HeaderFunc) ([]byte, error)
- type FileForm
- type Form
- type HeaderFunc
- type Http
- func (hp *Http) Do(method string, url string, body io.Reader, headerFunc HeaderFunc) ([]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, headerFunc HeaderFunc) ([]byte, error)
- func (hp *Http) FileName() string
- func (hp *Http) GetContentType() string
- func (hp *Http) IsFile() bool
- type ReadForm
- type Url
Constants ¶
View Source
const ( KContentType = "Content-Type" KContentDisposition = "Content-Disposition" )
Variables ¶
View Source
var (
FormType = reflect.TypeOf((*Form)(nil)).Elem()
)
Functions ¶
Types ¶
type HeaderFunc ¶ added in v0.5.0
type Http ¶
type Http struct { DisableLog bool TimeOut int64 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 ¶
Click to show internal directories.
Click to hide internal directories.