Merge pull request #10077 from robert4dt/develop

Handle application/pdf content type in rest integration
This commit is contained in:
Michael Drury 2023-04-03 15:30:03 +01:00 committed by GitHub
commit 2f57b3b16d
1 changed files with 4 additions and 1 deletions

View File

@ -151,7 +151,10 @@ class RestIntegration implements IntegrationBase {
data = data[keys[0]]
}
raw = rawXml
} else {
} else if (contentType.includes("application/pdf")) {
data = await response.arrayBuffer(); // Save PDF as ArrayBuffer
raw = Buffer.from(data);
else {
data = await response.text()
raw = data
}