Documentation ¶
Index ¶
- type Client
- func (c *Client) SendRequest(method, url string, body io.Reader, header http.Header, cookies []*http.Cookie) (*http.Response, error)
- func (c *Client) SetOptions(options ClientOptions)
- func (c *Client) UploadFile(url, file, fieldName string, header http.Header, cookies []*http.Cookie) (*http.Response, error)
- func (c *Client) UploadRequest(method, url, file, fieldName string, header http.Header, ...) (*http.Response, error)
- type ClientOptions
- type Sender
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines an http client object
func (*Client) SendRequest ¶
func (c *Client) SendRequest(method, url string, body io.Reader, header http.Header, cookies []*http.Cookie) (*http.Response, error)
SendRequest sends an http request with a defined method
func (*Client) SetOptions ¶
func (c *Client) SetOptions(options ClientOptions)
SetOptions sets options used for the http client
type ClientOptions ¶
ClientOptions defines the options to be set on the client
type Sender ¶
type Sender interface { SendRequest(method, url string, body io.Reader, header http.Header, cookies []*http.Cookie) (*http.Response, error) SetOptions(options ClientOptions) }
Sender provides an interface to the piper http client for uid/pwd and token authenticated requests
type Uploader ¶ added in v1.9.0
type Uploader interface { SendRequest(method, url string, body io.Reader, header http.Header, cookies []*http.Cookie) (*http.Response, error) UploadRequest(method, url, file, fieldName string, header http.Header, cookies []*http.Cookie) (*http.Response, error) UploadFile(url, file, fieldName string, header http.Header, cookies []*http.Cookie) (*http.Response, error) SetOptions(options ClientOptions) }
Uploader provides an interface to the piper http client for uid/pwd and token authenticated requests with upload capabilities
Click to show internal directories.
Click to hide internal directories.