Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ContentType() string
- func (c *Client) ContentTypeJSON()
- func (c *Client) ContentTypeTextPlain()
- func (c *Client) Delete(endpoint string) ([]byte, *http.Response, error)
- func (c *Client) Get(endpoint string, payload io.Reader) ([]byte, *http.Response, error)
- func (c *Client) NewRequest(method string, endpoint string, body io.Reader) (req *http.Request, err error)
- func (c *Client) Post(endpoint string, payload io.Reader) ([]byte, *http.Response, error)
- func (c *Client) Put(endpoint string, payload io.Reader) ([]byte, *http.Response, error)
- type Config
- type Service
Constants ¶
View Source
const ( // ContentTypeApplicationJSON ... ContentTypeApplicationJSON = "application/json" // ContentTypeTextPlain ... ContentTypeTextPlain = "text/plain" // BasePath = "service/rest/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ContentType ¶
ContentType returns the current configured HTTP content type
func (*Client) ContentTypeJSON ¶
func (c *Client) ContentTypeJSON()
ContentTypJSON configures the content type for future requests to be 'application/json'
func (*Client) ContentTypeTextPlain ¶
func (c *Client) ContentTypeTextPlain()
ContentTypTestPlain configures the content typ for future requests to be 'test/plain'
func (*Client) NewRequest ¶
Click to show internal directories.
Click to hide internal directories.