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-es.js
CHANGED
|
@@ -35,7 +35,7 @@ import express from 'express';
|
|
|
35
35
|
import bodyParser from 'body-parser';
|
|
36
36
|
|
|
37
37
|
var name = "botium-core";
|
|
38
|
-
var version$1 = "1.15.
|
|
38
|
+
var version$1 = "1.15.5";
|
|
39
39
|
var description = "The Selenium for Chatbots";
|
|
40
40
|
var main = "index.js";
|
|
41
41
|
var module = "dist/botium-es.js";
|
|
@@ -8167,9 +8167,8 @@ var SimpleRestContainer_1 = class SimpleRestContainer {
|
|
|
8167
8167
|
if (requestOptions.body) {
|
|
8168
8168
|
debug$4('Request.form and request.body are mutually exclusive');
|
|
8169
8169
|
}
|
|
8170
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
8170
8171
|
requestOptions.body = new URLSearchParams(requestOptions.form).toString();
|
|
8171
|
-
// it is set automatically by fetch
|
|
8172
|
-
// requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
8173
8172
|
delete requestOptions.form;
|
|
8174
8173
|
}
|
|
8175
8174
|
return requestOptions;
|
|
@@ -8448,7 +8447,8 @@ var SimpleRestContainer_1 = class SimpleRestContainer {
|
|
|
8448
8447
|
fetch(requestOptions.uri, requestOptions).then(async bodyRaw => {
|
|
8449
8448
|
let body;
|
|
8450
8449
|
try {
|
|
8451
|
-
|
|
8450
|
+
const contentType = bodyRaw.headers.get('content-type');
|
|
8451
|
+
if (contentType && contentType.includes('application/json')) {
|
|
8452
8452
|
try {
|
|
8453
8453
|
body = await bodyRaw.json();
|
|
8454
8454
|
} catch (err) {
|
|
@@ -8589,11 +8589,11 @@ var SimpleRestContainer_1 = class SimpleRestContainer {
|
|
|
8589
8589
|
}
|
|
8590
8590
|
}
|
|
8591
8591
|
this._addRequestOptions(requestOptions);
|
|
8592
|
-
this._fetchify(requestOptions);
|
|
8593
8592
|
await executeHook(this.caps, this.requestHook, Object.assign({
|
|
8594
8593
|
requestOptions
|
|
8595
8594
|
}, this.view));
|
|
8596
8595
|
this._addRequestCookies(requestOptions);
|
|
8596
|
+
this._fetchify(requestOptions);
|
|
8597
8597
|
return requestOptions;
|
|
8598
8598
|
}
|
|
8599
8599
|
async _waitForUrlResponse(httpConfig, retries) {
|