Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTimeout = time.Second * 30
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct
func (*Client) Execute ¶
func (c *Client) Execute(url, method string, headers map[string]string, queryParams map[string]interface{}, body string, responseCode int) (*ResponseConfig, error)
Request implementation
func (*Client) ExecuteJson ¶
func (c *Client) ExecuteJson(url, method string, headers map[string]string, queryParams map[string]interface{}, body interface{}, responseCode int) (*ResponseConfig, error)
ExecuteJson execute http request and returns response
type ResponseConfig ¶
type ResponseConfig struct { Method string `json:"method"` URL string `json:"url"` StatusCode int `json:"statusCode"` Headers map[string]string `json:"headers"` Body []byte `json:"-"` }
ResponseConfig of a request
func (*ResponseConfig) StringBody ¶
func (rc *ResponseConfig) StringBody() string
returns body as string
Click to show internal directories.
Click to hide internal directories.