Documentation
¶
Index ¶
- type Client
- func (c *Client) Delete(ctx context.Context, request *Request) (Response, error)
- func (c *Client) Get(ctx context.Context, request *Request) (Response, error)
- func (c *Client) Patch(ctx context.Context, request *Request) (rst Response, err error)
- func (c *Client) Post(ctx context.Context, request *Request) (Response, error)
- func (c *Client) PostForm(ctx context.Context, request *Request) (Response, error)
- func (c *Client) Put(ctx context.Context, request *Request) (rst Response, err error)
- type Headers
- type Option
- type PathParams
- type QueryParams
- type Request
- 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
}
Client provides methods for making REST requests.
type Headers ¶ added in v1.1.3
Headers is a map containing the relation key=value of the headers used on the http rest request.
type Option ¶
type Option func(*Client)
Option is a type to set HTTP Client options.
func WithTimeout ¶
WithTimeout instructs the HTTP Client to cancel any requests that exceeds the given timeout.
type PathParams ¶ added in v1.1.3
PathParams is a map containing the relation key=value of the path params used on the http rest request. It will be used to replace values given in Path parameter.
type QueryParams ¶ added in v1.1.3
QueryParams is a map containing the relation key=value of the query params used on the http rest request.
type Request ¶ added in v1.1.3
type Request struct {
Host string
Path string
Body []byte
Headers Headers
QueryParams QueryParams
PathParams PathParams
}
Request are the params used to build a new http rest request.
Click to show internal directories.
Click to hide internal directories.