getEmailHTMLJsonWithHttpInfo method

Future<Response> getEmailHTMLJsonWithHttpInfo(
  1. String emailId, {
  2. bool? decode,
})

Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content

Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type application/json;charset=utf-8 so you must call expecting that content response not JSON.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> getEmailHTMLJsonWithHttpInfo(String emailId, { bool? decode, }) async {
  // ignore: prefer_const_declarations
  final path = r'/emails/{emailId}/html/json'
    .replaceAll('{emailId}', emailId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (decode != null) {
    queryParams.addAll(_queryParams('', 'decode', decode));
  }

  const contentTypes = <String>[];


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