Documentation
¶
Index ¶
- Constants
- type Client
- func (c Client) Delete(ctx context.Context, url string, data []byte, hdr map[string]string) Res
- func (c Client) Get(ctx context.Context, url string, data []byte, hdr map[string]string) Res
- func (c Client) Patch(ctx context.Context, url string, data []byte, hdr map[string]string) Res
- func (c Client) Post(ctx context.Context, url string, data []byte, hdr map[string]string) Res
- func (c Client) Put(ctx context.Context, url string, data []byte, hdr map[string]string) Res
- func (c *Client) SetJSON(enabled bool)
- func (c *Client) SetLogger(logtype string)
- func (c *Client) SetTimeout(timeout int)
- type Res
Constants ¶
View Source
const TIMEOUT = 30000
TIMEOUT - default timeout
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client - initiated client instance
func (*Client) SetJSON ¶ added in v0.0.4
SetJSON - changes the default JSON true to false - HTML content
func (*Client) SetTimeout ¶
SetTimeout - changes the default timeout set on code
type Res ¶
type Res struct { Response http.Response Error error HTML string JSON json.RawMessage // contains filtered or unexported fields }
Res - response instance from http call
Click to show internal directories.
Click to hide internal directories.