MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

lib/storage/remote.ts:40–54  ·  view source on GitHub ↗
(httpRootDir: string, compilerProps: CompilerProps)

Source from the content-addressed store, hash-verified

38 protected readonly post: (uri: string, options?: RequestInit) => Promise<Response>;
39
40 constructor(httpRootDir: string, compilerProps: CompilerProps) {
41 super(httpRootDir, compilerProps);
42
43 this.baseUrl = compilerProps.ceProps('remoteStorageServer') as string;
44 this.get = (uri: string, options?: RequestInit) =>
45 fetch(new URL(uri, this.baseUrl).href, {
46 ...options,
47 method: 'GET',
48 });
49 this.post = (uri: string, options?: RequestInit) =>
50 fetch(new URL(uri, this.baseUrl).href, {
51 ...options,
52 method: 'POST',
53 });
54 }
55
56 override async handler(req: express.Request, res: express.Response) {
57 let resp: Response;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected