downloadAttachmentBase64WithHttpInfo method

Future<Response> downloadAttachmentBase64WithHttpInfo(
  1. String emailId,
  2. String attachmentId
)

Get email attachment as base64 encoded string as an alternative to binary responses. Decode the base64FileContents as a utf-8 encoded string or array of bytes depending on the contentType.

Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the downloadAttachment method but allows some clients to get around issues with binary responses.

Note: This method returns the HTTP Response.

Parameters:

  • String emailId (required): ID of email

  • String attachmentId (required): ID of attachment

Implementation

Future<Response> downloadAttachmentBase64WithHttpInfo(String emailId, String attachmentId,) async {
  // ignore: prefer_const_declarations
  final path = r'/emails/{emailId}/attachments/{attachmentId}/base64'
    .replaceAll('{emailId}', emailId)
    .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,
  );
}