22 lines
958 B
JavaScript
22 lines
958 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getResponseWithoutCors = void 0;
|
|
var RequestType_1 = require("../types/RequestType.js");
|
|
var MessagingType_1 = require("../../adapter-ameyo/types/MessagingType");
|
|
var getResponseWithoutCors = function (_a) {
|
|
var url = _a.url, method = _a.method, _b = _a.data, data = _b === void 0 ? {} : _b, requestKey = _a.requestKey, _c = _a.requestType, requestType = _c === void 0 ? RequestType_1.default.JSON : _c, _d = _a.headers, headers = _d === void 0 ? null : _d;
|
|
window.postMessage({
|
|
type: MessagingType_1.default.GET_RESPONSE_WITHOUT_CORS,
|
|
data: {
|
|
url: url,
|
|
method: method,
|
|
data: data,
|
|
requestKey: requestKey,
|
|
requestType: requestType,
|
|
headers: headers
|
|
}
|
|
});
|
|
};
|
|
exports.getResponseWithoutCors = getResponseWithoutCors;
|
|
exports.default = exports.getResponseWithoutCors;
|