getEmailHTMLWithHttpInfo method
Get email content as HTML. For displaying emails in browser context.
Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: ?apiKey=xxx
. Returns content-type text/html;charset=utf-8
so you must call expecting that content response not JSON. For JSON response see the getEmailHTMLJson
method.
Note: This method returns the HTTP Response
.
Parameters:
Implementation
Future<Response> getEmailHTMLWithHttpInfo(String emailId, { bool? decode, }) async {
// ignore: prefer_const_declarations
final path = r'/emails/{emailId}/html'
.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,
);
}