downloadAttachmentAsBase64EncodedWithHttpInfo method

Future<Response> downloadAttachmentAsBase64EncodedWithHttpInfo(
  1. String attachmentId
)

Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents.

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 attachmentId (required): ID of attachment

Implementation

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