"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpClientProvider = exports.httpClient = void 0;
exports.httpClient = {
    async get(url) {
        const response = await fetch(url);
        const data = await response.json();
        return {
            data,
            status: response.status,
            statusText: response.statusText,
            headers: Object.fromEntries(response.headers.entries())
        };
    },
    async post(url, body) {
        const response = await fetch(url, {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify(body)
        });
        const data = await response.json();
        return {
            data,
            status: response.status,
            statusText: response.statusText,
            headers: Object.fromEntries(response.headers.entries())
        };
    }
};
const HttpClientProvider = ({ children }) => children;
exports.HttpClientProvider = HttpClientProvider;
exports.default = exports.httpClient;
//# sourceMappingURL=http-client.js.map