MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / request

Function request

static/api/api.ts:39–47  ·  view source on GitHub ↗
(uri: string, options?: RequestInit)

Source from the content-addressed store, hash-verified

37
38/** Lightweight fetch() wrapper for CE API urls */
39const request = async <R>(uri: string, options?: RequestInit): Promise<TypedResponse<R>> =>
40 fetch(`${window.location.origin}${window.httpRoot}api${uri}`, {
41 ...options,
42 credentials: 'include',
43 headers: {
44 ...options?.headers,
45 Accept: 'application/json',
46 },
47 });
48
49/** GET /api/asm/:arch/:instruction */
50export const getAssemblyDocumentation = async (options: AssemblyDocumentationRequest) =>

Callers 15

source-tests.tsFile · 0.85
asm-docs-tests.tsFile · 0.85
noscript-tests.tsFile · 0.85
compile-tests.tsFile · 0.85
makeFakeJsonFunction · 0.85
makeFakeCmakeJsonFunction · 0.85
makeFakeQueryFunction · 0.85
api-tests.tsFile · 0.85
route-api-test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected