downloadAttachmentAsBytesWithHttpInfo method

Future<Response> downloadAttachmentAsBytesWithHttpInfo(
  1. String attachmentId
)

Download attachments. Get email attachment bytes. If you have trouble with byte responses try the downloadAttachmentBase64 response endpoints.

Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.

Note: This method returns the HTTP Response.

Parameters:

  • String attachmentId (required): ID of attachment

Implementation

Future<Response> downloadAttachmentAsBytesWithHttpInfo(String attachmentId,) async {
  // ignore: prefer_const_declarations
  final path = r'/attachments/{attachmentId}/bytes'
    .replaceAll('{attachmentId}', attachmentId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}