🐛 Fix issue with none-json requests (#2283)

This commit is contained in:
Jan 2021-10-06 12:00:38 -05:00 committed by GitHub
parent 3195e997ba
commit 9dbf6e5f6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -337,6 +337,7 @@ async function parseRequestObject(requestObject: IDataObject) {
axiosConfig.headers = Object.assign(axiosConfig.headers || {}, { accept: '*/*' });
}
if (
requestObject.json !== false &&
axiosConfig.data !== undefined &&
!(axiosConfig.data instanceof Buffer) &&
!allHeaders.some((headerKey) => headerKey.toLowerCase() === 'content-type')