|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
I would like to use Twilio (SMS Service) to POST incoming messages to Mirth through an HTTP Listener. Their messages come through as Content-Type application/x-www-form-urlencoded and the POST data looks like variable1=value1&variable2=value2&variable3=value3 .
No matter what I do, if the Content-Type in the header is sent to Mirth as application/x-www-form-urlencoded, I never receive any data from the source in Mirth. It is just blank! Currently I'm receiving the data on another web server, converting the data to JSON, modifying the header and re-POSTing the data to Mirth to get it to work, but I'd like to cut out the middle man. Any ideas? Thank you. |
#2
|
||||
|
||||
![]()
When an HTTP Listener receives that content type, it will automatically parse it into a map which will be available in the source map as "parameters". Look at the Mappings tab for your message.
To get a parameter in your channel code, do this: Code:
$('parameters').getParameter('varName')
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead? Nicholas Rupley Work: 949-237-6069 Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first. ![]()
|
#3
|
|||
|
|||
![]()
Thank you for the advice. With your help I got it working!
|
![]() |
Tags |
blank message, http listener, x-www-form-urlencoded |
Thread Tools | |
Display Modes | |
|
|