MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / doRequest

Function doRequest

gateway/admin/http.go:59–69  ·  view source on GitHub ↗
(ctx context.Context, method string, url string, body []byte)

Source from the content-addressed store, hash-verified

57
58}
59func doRequest(ctx context.Context, method string, url string, body []byte) (*http.Response, error) {
60
61 request, err := http.NewRequestWithContext(ctx, method, url, bytes.NewReader(body))
62 if err != nil {
63 return nil, err
64 }
65
66 request.Header.Set("User-Agent", "aoplatform")
67 request.Header.Set("content-type", "application/json")
68 return httpClient.Do(request)
69}

Callers 1

callHttpFunction · 0.85

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected