Documentation ¶
Index ¶
- func Destroy(client *Client)
- type Client
- type NewRequestOption
- type Request
- func (request *Request) Delete(url string, opts ...RequestOption) (*Response, error)
- func (request *Request) Get(url string, opts ...RequestOption) (*Response, error)
- func (request *Request) Post(url string, body any, opts ...RequestOption) (*Response, error)
- func (request *Request) Put(url string, body any, opts ...RequestOption) (*Response, error)
- func (request *Request) SetFiles(files map[string]string)
- func (request *Request) SetFormData(data map[string]string)
- func (request *Request) SetHeaders(headers map[string]string)
- func (request *Request) SetPathParams(pathParams map[string]string)
- func (request *Request) SetQueryParams(queryParams map[string]string)
- type RequestOption
- func WithRequestFiles(files map[string]string) RequestOption
- func WithRequestFormData(data map[string]string) RequestOption
- func WithRequestHeaders(headers map[string]string) RequestOption
- func WithRequestPathParams(pathParams map[string]string) RequestOption
- func WithRequestQueryParams(queryParams map[string]string) RequestOption
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) NewRequest ¶
func (client *Client) NewRequest(opts ...NewRequestOption) *Request
type NewRequestOption ¶
type NewRequestOption func(client *Client)
func WithNewRequestTimeout ¶
func WithNewRequestTimeout(timeout time.Duration) NewRequestOption
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) Delete ¶
func (request *Request) Delete(url string, opts ...RequestOption) (*Response, error)
func (*Request) Get ¶
func (request *Request) Get(url string, opts ...RequestOption) (*Response, error)
func (*Request) SetFormData ¶
func (*Request) SetHeaders ¶
func (*Request) SetPathParams ¶
func (*Request) SetQueryParams ¶
type RequestOption ¶
type RequestOption func(request *Request)
func WithRequestFiles ¶
func WithRequestFiles(files map[string]string) RequestOption
func WithRequestFormData ¶
func WithRequestFormData(data map[string]string) RequestOption
func WithRequestHeaders ¶
func WithRequestHeaders(headers map[string]string) RequestOption
func WithRequestPathParams ¶
func WithRequestPathParams(pathParams map[string]string) RequestOption
func WithRequestQueryParams ¶
func WithRequestQueryParams(queryParams map[string]string) RequestOption
Click to show internal directories.
Click to hide internal directories.