From 9680885fa3d2f276ae999b8d01abeb3f300439c3 Mon Sep 17 00:00:00 2001 From: Jon M Date: Mon, 25 Jul 2022 15:16:31 +0100 Subject: [PATCH] Encode attachment download as binary --- src/mailosaurCommands.d.ts | 2 +- src/mailosaurCommands.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mailosaurCommands.d.ts b/src/mailosaurCommands.d.ts index 367c0dd..db34630 100644 --- a/src/mailosaurCommands.d.ts +++ b/src/mailosaurCommands.d.ts @@ -852,7 +852,7 @@ declare global { * The identifier for the required attachment. */ attachmentId: string - ): Cypress.Chainable; + ): Cypress.Chainable; /** * Downloads an EML file representing the specified email. diff --git a/src/mailosaurCommands.js b/src/mailosaurCommands.js index 81f8929..0d92cee 100644 --- a/src/mailosaurCommands.js +++ b/src/mailosaurCommands.js @@ -200,7 +200,7 @@ class MailosaurCommands { } mailosaurDownloadAttachment(attachmentId) { - return this.request.get(`api/files/attachments/${attachmentId}`); + return this.request.get(`api/files/attachments/${attachmentId}`, { encoding: 'binary' }); } mailosaurDownloadMessage(messageId) {