MCPcopy Create free account
hub / github.com/algolia/cli / StringResponse

Function StringResponse

pkg/httpmock/stub.go:34–38  ·  view source on GitHub ↗
(body string)

Source from the content-addressed store, hash-verified

32}
33
34func StringResponse(body string) Responder {
35 return func(req *http.Request) (*http.Response, error) {
36 return httpResponse(200, req, bytes.NewBufferString(body)), nil
37 }
38}
39
40func JSONResponse(body interface{}) Responder {
41 return func(req *http.Request) (*http.Response, error) {

Callers 15

TestGetCompositionFunction · 0.92
TestSearchCompositionFunction · 0.92
TestDeleteCompositionFunction · 0.92
TestWaitForTask_TimeoutFunction · 0.92
TestGetRuleFunction · 0.92
TestDeleteRuleFunction · 0.92
TestListRulesFunction · 0.92
TestUpsertRuleFunction · 0.92

Calls 1

httpResponseFunction · 0.85

Tested by 15

TestGetCompositionFunction · 0.74
TestSearchCompositionFunction · 0.74
TestDeleteCompositionFunction · 0.74
TestWaitForTask_TimeoutFunction · 0.74
TestGetRuleFunction · 0.74
TestDeleteRuleFunction · 0.74
TestListRulesFunction · 0.74
TestUpsertRuleFunction · 0.74