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