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

Function getJSON

internal/httpapi/messages_test.go:9–23  ·  view source on GitHub ↗
(t *testing.T, url, bearer string)

Source from the content-addressed store, hash-verified

7)
8
9func getJSON(t *testing.T, url, bearer string) (int, map[string]any) {
10 t.Helper()
11 req, _ := http.NewRequest("GET", url, nil)
12 if bearer != "" {
13 req.Header.Set("Authorization", "Bearer "+bearer)
14 }
15 resp, err := http.DefaultClient.Do(req)
16 if err != nil {
17 t.Fatal(err)
18 }
19 defer resp.Body.Close()
20 var body map[string]any
21 _ = json.NewDecoder(resp.Body).Decode(&body)
22 return resp.StatusCode, body
23}
24
25func TestListMessagesPageEnvelopeAndCursor(t *testing.T) {
26 srv := testServer(t)

Callers 15

TestGetConversationShapeFunction · 0.85
TestListDomainsFunction · 0.85
TestGetDomainFunction · 0.85
TestGetDomainNotFoundFunction · 0.85
TestGetMyLimitsFunction · 0.85
TestListAPIKeysFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected