(url, method string, o interface{})
| 135 | } |
| 136 | |
| 137 | func (c *apiClient) RequestJSON(url, method string, o interface{}) (*http.Response, error) { |
| 138 | data, err := json.Marshal(o) |
| 139 | if err != nil { |
| 140 | return nil, err |
| 141 | } |
| 142 | return c.Request(url, method, bytes.NewBuffer(data)) |
| 143 | } |
| 144 | |
| 145 | func (c *apiClient) Get(url string) (*http.Response, error) { |
| 146 | return c.RequestString(url, "GET", "") |