Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Connect(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- func (c *Client) Delete(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- func (c *Client) Get(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- func (c *Client) Options(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- func (c *Client) Patch(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- func (c *Client) Post(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- func (c *Client) PrepareRequest(ctx context.Context, method, endpoint string, opts ...Option) (*http.Request, error)
- func (c *Client) Put(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- func (c *Client) Trace(ctx context.Context, endpoint string, opts ...Option) (*Response, error)
- type ClientOption
- type Clienter
- type Header
- type Option
- type Response
Constants ¶
View Source
const (
DEFAULT_TIMEOUT = 10 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.1.4
type Client struct {
// contains filtered or unexported fields
}
Client is a struct who has BaseUrl property
func (*Client) PrepareRequest ¶ added in v0.1.5
func (c *Client) PrepareRequest(ctx context.Context, method, endpoint string, opts ...Option) (*http.Request, error)
PrepareRequest func returns a request
type ClientOption ¶ added in v0.1.5
type ClientOption Option
func WithCustomHttpClient ¶ added in v1.0.0
func WithCustomHttpClient(client *http.Client) ClientOption
func WithDefaultHeaders ¶ added in v0.1.5
func WithDefaultHeaders() ClientOption
func WithTimeout ¶ added in v0.1.5
func WithTimeout(timeout time.Duration) ClientOption
type Clienter ¶ added in v0.1.5
type Clienter interface{}
Clienter is a interface who calls the methods
Click to show internal directories.
Click to hide internal directories.