web stats
Store Http response status in custom metadata - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2020, 07:28 AM
yachink yachink is offline
What's HL7?
 
Join Date: Jan 2020
Posts: 5
yachink is on a distinguished road
Default Store Http response status in custom metadata

Hi,

I am trying to store Http response status in custom metadata without luck. Here's my configuration (see screenshot attached). If I put default value, it always stores as default value. Which means the custom metadata was defined correctly. Thank you.
Attached Images
File Type: png Screenshot 2020-02-25 11.24.35.png (55.3 KB, 10 views)
Reply With Quote
  #2  
Old 02-26-2020, 03:13 PM
pacmano pacmano is offline
OBX.3 Kenobi
 
Join Date: Oct 2009
Location: Texas
Posts: 131
pacmano is on a distinguished road
Default

I am not sure I understand your question.

If your question is "I have an HTTP Sender and I am calling an endpoint and I would like the response status stored to then be available for metadata inclusion" then:

1) Your response transformer won't fire every time unless it is set its data type to RAW.
2) The response (like "HTTP/1.1 200 OK") is reference-able with
Code:
$('responseStatusLine')
e.g. (transformer type "javascript" for this)

Code:
$c('thisVariableHasTheStatusCode',$('responseStatusLine'))
Then you can add "thisVariableHasTheStatusCode" to metadata.
__________________
Mirth 3.8.0 / PostgreSQL 11 / Ubuntu 18.04
Diridium Technologies, Inc.
https://diridium.com
Reply With Quote
  #3  
Old 03-03-2020, 12:10 PM
yachink yachink is offline
What's HL7?
 
Join Date: Jan 2020
Posts: 5
yachink is on a distinguished road
Default

getting $('responseStatusLine') in Javascript helps! Thank you!
I was trying to do in the mapper....
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:54 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation