MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / getRaw

Function getRaw

internal/httpapi/ratelimit_test.go:19–30  ·  view source on GitHub ↗

getRaw issues a GET and returns the full response so header assertions are possible (getJSON discards headers).

(t *testing.T, url, bearer string)

Source from the content-addressed store, hash-verified

17// getRaw issues a GET and returns the full response so header assertions are
18// possible (getJSON discards headers).
19func getRaw(t *testing.T, url, bearer string) *http.Response {
20 t.Helper()
21 req, _ := http.NewRequest("GET", url, nil)
22 if bearer != "" {
23 req.Header.Set("Authorization", "Bearer "+bearer)
24 }
25 resp, err := http.DefaultClient.Do(req)
26 if err != nil {
27 t.Fatal(err)
28 }
29 return resp
30}
31
32func TestPollRateLimited(t *testing.T) {
33 srv := httptest.NewServer(New(Deps{

Callers 3

TestPollRateLimitedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected