Documentation ¶
Index ¶
- func NewFormBody(values, files url.Values) (contentType string, bodyReader io.Reader, err error)
- func NewFormBody2(values url.Values, files Files) (contentType string, bodyReader io.Reader)
- func NewJSONBody(v interface{}) (contentType string, bodyReader io.Reader, err error)
- func NewXMLBody(v interface{}) (contentType string, bodyReader io.Reader, err error)
- type File
- type Files
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFormBody ¶
NewFormBody returns form request content type and body reader. NOTE:
@values format: <fieldName,[value]> @files format: <fieldName,[fileName]>
func NewFormBody2 ¶
NewFormBody2 returns form request content type and body reader. NOTE:
@values format: <fieldName,[value]> @files format: <fieldName,[File]>
func NewJSONBody ¶
NewJSONBody returns JSON request content type and body reader.
Types ¶
type File ¶
type File interface { // Name returns the name of the file as presented to Open. Name() string // Read reads up to len(b) bytes from the File. // It returns the number of bytes read and any error encountered. // At end of file, Read returns 0, io.EOF. Read(p []byte) (n int, err error) }
File interface for form.
Click to show internal directories.
Click to hide internal directories.