Skip to content

Instantly share code, notes, and snippets.

@ppazos
Created September 15, 2023 05:15
Show Gist options
  • Save ppazos/f70ca7e52c38eb30fd56fc898014e3cb to your computer and use it in GitHub Desktop.
Save ppazos/f70ca7e52c38eb30fd56fc898014e3cb to your computer and use it in GitHub Desktop.
Mirth Connect access to HTTP response status on response transformer
// response transformer
logger.info("RESPONSE TRANSFORMER");
logger.info(msg);
logger.info($('responseStatusLine'));
var statusLine = $('responseStatusLine');
var parts = statusLine.split(' ');
if (parts.length >= 2)
{
var responseCode = parseInt(parts[1], 10);
logger.info('Response code int: '+ responseCode);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment