Skip to content

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

517 B
Raw Blame
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 };