Documentation
¶
Index ¶
- Variables
- type Client
- type Error
- type Option
- type Request
- func (r Request) Body() (io.Reader, error)
- func (r Request) HTTP(ctx context.Context) (*http.Request, error)
- func (r Request) Handler() string
- func (r Request) Method() string
- func (r Request) ParseURL() (*url.URL, error)
- func (r Request) RawBody() interface{}
- func (r Request) URI() string
- func (r Request) WithBase(u *url.URL) Request
- func (r Request) WithBody(b interface{}, encoder func(v interface{}) (io.Reader, error), ...) Request
- func (r Request) WithErrorHandler(h func(statusCode int, b []byte) error) Request
- func (r Request) WithHeader(value ...Value) Request
- func (r Request) WithJSONBody(b interface{}) Request
- func (r Request) WithPath(path string) Request
- func (r Request) WithPathf(path string, args ...interface{}) Request
- func (r Request) WithQuery(value ...Value) Request
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBody = errors.New("must set []byte, io.Reader, or string for the body")
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Client)
func WithDecode ¶
func WithHeaders ¶
func WithLogFunc ¶
func WithTimeout ¶
func WithTransport ¶
func WithTransport(t http.RoundTripper) Option
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func (Request) WithErrorHandler ¶
func (Request) WithHeader ¶
func (Request) WithJSONBody ¶
Click to show internal directories.
Click to hide internal directories.