Documentation
¶
Index ¶
- 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 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 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.