From 2dd8b1425f2332f5632d2f609bfdddec44567f51 Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Fri, 17 Nov 2023 12:22:57 -0500 Subject: [PATCH] add warning for closing stream --- src/main/kotlin/com/nylas/resources/Attachments.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/com/nylas/resources/Attachments.kt b/src/main/kotlin/com/nylas/resources/Attachments.kt index 2196f359..d52ce2c4 100644 --- a/src/main/kotlin/com/nylas/resources/Attachments.kt +++ b/src/main/kotlin/com/nylas/resources/Attachments.kt @@ -30,6 +30,7 @@ class Attachments(client: NylasClient) : Resource(client, Attachment * * This method returns a [ResponseBody] which can be used to stream the attachment data, * and exposes useful headers such as the content type and content length. + * **NOTE**: The caller is responsible for closing the response body. * * Alternatively, you can use [downloadBytes] to download the attachment as a byte array. *