Versions in this module Expand all Collapse all v0 v0.4.1 Sep 6, 2017 Changes in this version + func AddRequestHeader(c Config, req *http.Request) *http.Request + type Client struct + BaseURL *url.URL + Config Config + UserAgent string + func New(httpClient *http.Client, config Config) (*Client, error) + func NewClient(httpClient *http.Client) *Client + func (c *Client) Do(req *http.Request) (*Response, error) + func (c *Client) Get(url string) (*Response, error) + func (c *Client) Head(url string) (*Response, error) + func (c *Client) NewJSONRequest(method, urlStr string, body interface{}) (*http.Request, error) + func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) + func (c *Client) Post(url string, bodyType string, body interface{}) (*Response, error) + func (c *Client) PostForm(url string, data url.Values) (*Response, error) + func (c *Client) PostJSON(url string, data interface{}) (*Response, error) + type Config struct + AccessToken string + ClientSecret string + ClientToken string + Debug bool + HeaderToSign []string + Host string + MaxBody int + func Init(filepath string, section string) (Config, error) + func InitConfig(filepath string, section string) Config + func InitEdgeRc(filepath string, section string) (Config, error) + func InitEnv(section string) (Config, error) + func (c Config) AddRequestHeader(req *http.Request) *http.Request + type JSONBody map[string]interface + type Response http.Response + func (r *Response) BodyJSON(data interface{}) error