fix(HTTP Node): fix instance crashing when batching enabled (#3902)

* 🐛 Fix instance crashing when batching enabled

* Add flag parsing for simple mode

* 🐛 Fix issue with simple flag

*  improvements

*  Improvements

* 🔥 Remove console.log

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
Ricardo Espinoza
2022-09-15 16:32:13 -04:00
committed by GitHub
parent 6c41b29ad2
commit 0ab89ad5d6
2 changed files with 27 additions and 21 deletions

View File

@@ -479,12 +479,15 @@ async function parseRequestObject(requestObject: IDataObject) {
});
}
if (requestObject.simple === false) {
axiosConfig.validateStatus = () => true;
}
/**
* Missing properties:
* encoding (need testing)
* gzip (ignored - default already works)
* resolveWithFullResponse (implemented elsewhere)
* simple (???)
*/
return axiosConfig;
@@ -781,6 +784,7 @@ async function httpRequest(
) {
delete axiosRequest.data;
}
const result = await axios(axiosRequest);
if (requestOptions.returnFullResponse) {
return {