"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchJSON = fetchJSON;
function fetchJSON(hostname, options = {}) {
    const { method, data, headers } = options;
    return fetch(hostname, {
        method,
        body: JSON.stringify(data),
        headers: {
            'Content-Type': 'application/json',
            ...headers,
        },
        credentials: 'include',
    });
}
//# sourceMappingURL=fetch.js.map