REST performs a REST request and parses the response.
(hostname string, method string, p string, body io.Reader, data interface{})
| 102 | |
| 103 | // REST performs a REST request and parses the response. |
| 104 | func (c Client) REST(hostname string, method string, p string, body io.Reader, data interface{}) error { |
| 105 | opts := clientOptions(hostname, c.http.Transport) |
| 106 | restClient, err := ghAPI.NewRESTClient(opts) |
| 107 | if err != nil { |
| 108 | return err |
| 109 | } |
| 110 | return handleResponse(restClient.Do(method, p, body, data)) |
| 111 | } |
| 112 | |
| 113 | func (c Client) RESTWithNext(hostname string, method string, p string, body io.Reader, data interface{}) (string, error) { |
| 114 | opts := clientOptions(hostname, c.http.Transport) |
nothing calls this directly
no test coverage detected