Documentation ¶
Index ¶
- func Debug(endpoint string) (*http.Response, error)
- func DecodeBody(obj interface{}, body io.ReadCloser) error
- func Delete(endpoint string, opts ...Option) (*http.Response, error)
- func Get(endpoint string, opts ...Option) (*http.Response, error)
- func Hijack(endpoint string, opts ...Option) (*http.Response, net.Conn, *bufio.Reader, error)
- func Post(endpoint string, opts ...Option) (*http.Response, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
Debug sends request to the default pouchd server to get the debug info.
NOTE: without any vesion information.
func DecodeBody ¶
func DecodeBody(obj interface{}, body io.ReadCloser) error
DecodeBody decodes body to obj.
Types ¶
type Option ¶
Option defines a type used to update http.Request.
func WithContext ¶
WithContext sets the ctx of http.Request.
func WithHeader ¶
WithHeader sets the Header of http.Request.
func WithJSONBody ¶
func WithJSONBody(obj interface{}) Option
WithJSONBody encodes the input data to JSON and sets it to the body in http.Request
Click to show internal directories.
Click to hide internal directories.