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

Function errorResponse418

cmd/cmd_test.go:126–136  ·  view source on GitHub ↗
(contentType string, body string)

Source from the content-addressed store, hash-verified

124}
125
126func errorResponse418(contentType string, body string) *http.Response {
127 response := &http.Response{
128 Status: "418 I'm a teapot",
129 StatusCode: 418,
130 Header: make(http.Header),
131 Body: ioutil.NopCloser(strings.NewReader(body)),
132 ContentLength: int64(len(body)),
133 }
134 response.Header.Set("Content-Type", contentType)
135 return response
136}
137
138func errorResponse429(retryAfter string) *http.Response {
139 body := ""

Callers 1

TestDecodeErrorResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected