Documentation ¶
Index ¶
- func Do(c *httputil.Client, method string, data DataMultipartWriter, v interface{}, ...) error
- func PATCH(c *httputil.Client, data DataMultipartWriter, v interface{}, url string) error
- func POST(c *httputil.Client, data DataMultipartWriter, v interface{}, url string) error
- func Write(body *multipart.Writer, item interface{}, files []File) error
- type DataMultipartWriter
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
func Do(c *httputil.Client, method string, data DataMultipartWriter, v interface{}, url string) error
Do sends an HTTP request using client to the given URL and unmarshals the body into v if it's not nil. It will only send using multipart if needed.
func PATCH ¶
func PATCH(c *httputil.Client, data DataMultipartWriter, v interface{}, url string) error
PATCH sends a PATCH request using client to the given URL and unmarshals the body into v if it's not nil. It will only send using multipart if needed. It is equivalent to calling Do with "PATCH"
Types ¶
type DataMultipartWriter ¶
type DataMultipartWriter interface { // NeedsMultipart returns true if the data interface must be sent using // multipart form. NeedsMultipart() bool httputil.MultipartWriter }
DataMultipartWriter is a MultipartWriter that also contains data that's JSON-marshalable.
Click to show internal directories.
Click to hide internal directories.