mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-12 18:37:12 +00:00
e7a03a0539
call-graph INFERRED edges, multi-language semantic extraction, SHA256 cache, MCP stdio server with shortest_path, Q&A memory feedback loop
24 lines
517 B
TypeScript
24 lines
517 B
TypeScript
import { Response } from './models';
|
|
|
|
class HttpClient {
|
|
private baseUrl: string;
|
|
|
|
constructor(baseUrl: string) {
|
|
this.baseUrl = baseUrl;
|
|
}
|
|
|
|
async get(path: string): Promise<Response> {
|
|
return fetch(this.baseUrl + path);
|
|
}
|
|
|
|
async post(path: string, body: unknown): Promise<Response> {
|
|
return this.get(path);
|
|
}
|
|
}
|
|
|
|
function buildHeaders(token: string): Record<string, string> {
|
|
return { Authorization: `Bearer ${token}` };
|
|
}
|
|
|
|
export { HttpClient, buildHeaders };
|