REST performs a REST request and parses the response.
(hostname string, method string, p string, body io.Reader, data any)
| 155 | |
| 156 | // REST performs a REST request and parses the response. |
| 157 | func (c Client) REST(hostname string, method string, p string, body io.Reader, data any) error { |
| 158 | opts := clientOptions(hostname, c.http.Transport) |
| 159 | restClient, err := ghAPI.NewRESTClient(opts) |
| 160 | if err != nil { |
| 161 | return err |
| 162 | } |
| 163 | return handleResponse(restClient.Do(method, p, body, data)) |
| 164 | } |
| 165 | |
| 166 | func (c Client) RESTWithNext(hostname string, method string, p string, body io.Reader, data any) (string, error) { |
| 167 | opts := clientOptions(hostname, c.http.Transport) |
nothing calls this directly
no test coverage detected