MCPcopy Create free account
hub / github.com/exercism/cli / Do

Method Do

api/client.go:65–75  ·  view source on GitHub ↗

Do performs an http.Request and optionally parses the response body into the given interface.

(req *http.Request)

Source from the content-addressed store, hash-verified

63
64// Do performs an http.Request and optionally parses the response body into the given interface.
65func (c *Client) Do(req *http.Request) (*http.Response, error) {
66 debug.DumpRequest(req)
67
68 res, err := c.Client.Do(req)
69 if err != nil {
70 return nil, err
71 }
72
73 debug.DumpResponse(res)
74 return res, nil
75}
76
77// TokenIsValid calls the API to determine whether the token is valid.
78func (c *Client) TokenIsValid() (bool, error) {

Callers 7

submitMethod · 0.95
runDownloadFunction · 0.95
newDownloadFunction · 0.95
TestDoFunction · 0.95
TokenIsValidMethod · 0.95
IsPingableMethod · 0.95
downloadMethod · 0.80

Calls 2

DumpRequestFunction · 0.92
DumpResponseFunction · 0.92

Tested by 1

TestDoFunction · 0.76