Documentation ¶
Index ¶
- type BasicAuth
- type Header
- type Request
- func (r Request) AddBasicAuth(username string, password string) Request
- func (r Request) AddHeader(key string, value string) Request
- func (r Request) Do() (Response, error)
- func (r Request) Get() (Request, error)
- func (r Request) GetJSON() (Request, error)
- func (r Request) PostForm(params map[string]string) (Request, error)
- func (r Request) PostFormFile(params map[string]string, paramName string, fileName string, ...) (Request, error)
- func (r Request) PostFormFileDisk(params map[string]string, paramName string, filePath string) (Request, error)
- func (r Request) PostJSON(body interface{}) (Request, error)
- func (r Request) PutForm(params map[string]string) (Request, error)
- func (r Request) PutFormFile(params map[string]string, paramName string, fileName string, ...) (Request, error)
- func (r Request) PutFormFileDisk(params map[string]string, paramName string, filePath string) (Request, error)
- func (r Request) PutJSON(body interface{}) (Request, error)
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { URI string Req *http.Request Timeout time.Duration Headers []Header BasicAuth BasicAuth }
Request - the request object
func (Request) AddBasicAuth ¶ added in v0.0.5
AddBasicAuth - add basic auth on the request
func (Request) PostFormFile ¶
func (r Request) PostFormFile(params map[string]string, paramName string, fileName string, fileBuffer *bytes.Buffer) (Request, error)
PostFormFile - POST request for a multipart upload with file buffer with optional params
func (Request) PostFormFileDisk ¶
func (r Request) PostFormFileDisk(params map[string]string, paramName string, filePath string) (Request, error)
PostFormFileDisk - POST request for a multipart upload with file path with optional params
func (Request) PutFormFile ¶
func (r Request) PutFormFile(params map[string]string, paramName string, fileName string, fileBuffer *bytes.Buffer) (Request, error)
PutFormFile - PUT request for a multipart upload with file buffer with optional params
Click to show internal directories.
Click to hide internal directories.