botium-core 1.15.3 → 1.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/botium-cjs.js +5 -5
- package/dist/botium-cjs.js.map +1 -1
- package/dist/botium-es.js +5 -5
- package/dist/botium-es.js.map +1 -1
- package/package.json +1 -1
- package/src/containers/plugins/SimpleRestContainer.js +4 -4
- package/src/scripting/logichook/userinput/MediaInput.js +2 -1
- package/test/connectors/simplerest.spec.js +5 -5
package/dist/botium-cjs.js
CHANGED
|
@@ -77,7 +77,7 @@ var express__default = /*#__PURE__*/_interopDefaultLegacy(express);
|
|
|
77
77
|
var bodyParser__default = /*#__PURE__*/_interopDefaultLegacy(bodyParser);
|
|
78
78
|
|
|
79
79
|
var name = "botium-core";
|
|
80
|
-
var version$1 = "1.15.
|
|
80
|
+
var version$1 = "1.15.5";
|
|
81
81
|
var description = "The Selenium for Chatbots";
|
|
82
82
|
var main = "index.js";
|
|
83
83
|
var module$1 = "dist/botium-es.js";
|
|
@@ -8209,9 +8209,8 @@ var SimpleRestContainer_1 = class SimpleRestContainer {
|
|
|
8209
8209
|
if (requestOptions.body) {
|
|
8210
8210
|
debug$4('Request.form and request.body are mutually exclusive');
|
|
8211
8211
|
}
|
|
8212
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
8212
8213
|
requestOptions.body = new URLSearchParams(requestOptions.form).toString();
|
|
8213
|
-
// it is set automatically by fetch
|
|
8214
|
-
// requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
8215
8214
|
delete requestOptions.form;
|
|
8216
8215
|
}
|
|
8217
8216
|
return requestOptions;
|
|
@@ -8490,7 +8489,8 @@ var SimpleRestContainer_1 = class SimpleRestContainer {
|
|
|
8490
8489
|
fetch(requestOptions.uri, requestOptions).then(async bodyRaw => {
|
|
8491
8490
|
let body;
|
|
8492
8491
|
try {
|
|
8493
|
-
|
|
8492
|
+
const contentType = bodyRaw.headers.get('content-type');
|
|
8493
|
+
if (contentType && contentType.includes('application/json')) {
|
|
8494
8494
|
try {
|
|
8495
8495
|
body = await bodyRaw.json();
|
|
8496
8496
|
} catch (err) {
|
|
@@ -8631,11 +8631,11 @@ var SimpleRestContainer_1 = class SimpleRestContainer {
|
|
|
8631
8631
|
}
|
|
8632
8632
|
}
|
|
8633
8633
|
this._addRequestOptions(requestOptions);
|
|
8634
|
-
this._fetchify(requestOptions);
|
|
8635
8634
|
await executeHook(this.caps, this.requestHook, Object.assign({
|
|
8636
8635
|
requestOptions
|
|
8637
8636
|
}, this.view));
|
|
8638
8637
|
this._addRequestCookies(requestOptions);
|
|
8638
|
+
this._fetchify(requestOptions);
|
|
8639
8639
|
return requestOptions;
|
|
8640
8640
|
}
|
|
8641
8641
|
async _waitForUrlResponse(httpConfig, retries) {
|