Documentation
¶
Index ¶
- type Client
- func (c *Client) Delete[T any](path string, opts ...RequestOption) *Response[T]
- func (c *Client) Do[T any](method, path string, in any, opts ...RequestOption) *Response[T]
- func (c *Client) Get[T any](path string, opts ...RequestOption) *Response[T]
- func (c *Client) Patch[T any](path string, in any, opts ...RequestOption) *Response[T]
- func (c *Client) Post[T any](path string, in any, opts ...RequestOption) *Response[T]
- func (c *Client) Put[T any](path string, in any, opts ...RequestOption) *Response[T]
- func (c *Client) WithT(t testing.TB) *Client
- type Option
- type RequestOption
- type Response
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
}
func NewHandler ¶
NewHandler returns a client that calls h in-process (no network).
func (*Client) Delete ¶
func (c *Client) Delete[T any](path string, opts ...RequestOption) *Response[T]
type Option ¶
type Option func(*Client)
func WithDefaultHeaders ¶
func WithTimeout ¶
func WithTransport ¶
func WithTransport(rt http.RoundTripper) Option
type RequestOption ¶
func WithBearer ¶
func WithBearer(token string) RequestOption
func WithContext ¶
func WithContext(ctx context.Context) RequestOption
func WithHeader ¶
func WithHeader(k, v string) RequestOption
func WithQuery ¶
func WithQuery(q url.Values) RequestOption
func WithQueryParam ¶
func WithQueryParam(k, v string) RequestOption
Click to show internal directories.
Click to hide internal directories.