salsify-experiences-sdk
Version:
SDK to be used by commerce websites to implement product experiences.
18 lines • 566 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Header = void 0;
var Header;
(function (Header) {
Header["ContentLength"] = "content-length";
})(Header || (exports.Header = Header = {}));
const head = (url) => fetch(url, { method: 'HEAD' });
const get = (url) => fetch(url, { method: 'GET' });
const post = (url, data) => fetch(url, {
method: 'POST',
body: JSON.stringify(data),
headers: {
'content-type': 'text/plain',
},
});
exports.default = { head, get, post };
//# sourceMappingURL=request.js.map