Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) MethodDelete(ctx context.Context, path string) *Request
- func (c *Client) MethodGet(ctx context.Context, path string) *Request
- func (c *Client) MethodPatch(ctx context.Context, path string) *Request
- func (c *Client) MethodPost(ctx context.Context, path string) *Request
- func (c *Client) MethodPut(ctx context.Context, path string) *Request
- func (c *Client) MultipartMethodPost(ctx context.Context, path string) *Multipart
- type Multipart
- func (r *Multipart) ContentType(contentType string) *Multipart
- func (r *Multipart) File(fieldName, filename string, content io.Reader) *Multipart
- func (r *Multipart) FormField(fieldName, value string) *Multipart
- func (r *Multipart) GetRequest() (*Multipart, error)
- func (r *Multipart) Header(key, value string) *Multipart
- func (r *Multipart) Headers(headers map[string]string) *Multipart
- func (r *Multipart) Multipart() error
- func (r *Multipart) Send() (*http.Response, error)
- type Request
- func (r *Request) Body(body io.ReadCloser) *Request
- func (r *Request) BytesBody(body []byte) *Request
- func (r *Request) ContentType(contentType string) *Request
- func (r *Request) GetRequest() (*Request, error)
- func (r *Request) Header(key, value string) *Request
- func (r *Request) Headers(headers map[string]string) *Request
- func (r *Request) JSONBody(body any) *Request
- func (r *Request) QueryParam(key, value string) *Request
- func (r *Request) QueryParams(params map[string]string) *Request
- func (r *Request) QueryValues(values url.Values) *Request
- func (r *Request) Send() (*http.Response, error)
- func (r *Request) StringBody(body string) *Request
Constants ¶
View Source
const ( ApplicationJSON = "application/json" ContentType = "Content-Type" ContentLength = "Content-Length" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) MethodDelete ¶
func (*Client) MethodPatch ¶
type Multipart ¶ added in v1.1.0
type Multipart struct {
*Client
// contains filtered or unexported fields
}
func (*Multipart) ContentType ¶ added in v1.1.0
func (*Multipart) GetRequest ¶ added in v1.1.0
type Request ¶
type Request struct {
*Client
// contains filtered or unexported fields
}
func (*Request) ContentType ¶
func (*Request) GetRequest ¶ added in v0.0.4
func (*Request) QueryParam ¶
func (*Request) StringBody ¶
Click to show internal directories.
Click to hide internal directories.