Documentation ¶
Index ¶
- type MultipartFileEntry
- type SimpleClient
- func (c *SimpleClient) Get(urlStr string, params url.Values) (*http.Request, *http.Response, error)
- func (c *SimpleClient) Multipart(urlStr string, files map[string]string, get, post url.Values, ...) (*http.Request, *http.Response, error)
- func (c *SimpleClient) Post(urlStr string, get url.Values, post interface{}) (*http.Request, *http.Response, error)
- type WriteFileFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultipartFileEntry ¶
MultipartFileEntry is a multipart file entry. It is used to map a file to it's field value and label for Multipart requests.
type SimpleClient ¶
type SimpleClient struct { // Base is the base to use for all urls. If empty, will use the given urls as is. Base string // NewRequest allows to customize which http.Request the simple client will use. NewRequest func(method, urlStr string, body io.Reader) (*http.Request, error) }
SimpleClient is a simplified http client
func NewSimpleClient ¶
func NewSimpleClient() *SimpleClient
NewSimpleClient creates a new default client
type WriteFileFunc ¶
type WriteFileFunc func(dst io.Writer, src MultipartFileEntry) (int64, error)
WriteFileFunc allows the caller to customize how the file is written. If this is null, a simple io.Copy will be done.
Click to show internal directories.
Click to hide internal directories.