web stats
HTTP Sender: Dynamically set Query Parameters - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2018, 06:14 AM
kristof.taveirne kristof.taveirne is offline
Mirth Newb
 
Join Date: Apr 2010
Posts: 10
kristof.taveirne is on a distinguished road
Default HTTP Sender: Dynamically set Query Parameters

Hi,

I have a HTTP Sender where I want to provide a combination of search parameters as query parameters to the HTTP GET request.

I can pass through the parameters if they are provided, but if they are not provided, as all of them are optional, I get the string ${myparam} in the encoded url.

Is there a way to avoid this?

Or maybe even better, is there are way to set the Query Parameters from the transfomation step of the HTTP Sender destination?

Thank you!!

Kind regards,

Kristof Taveirne
Reply With Quote
  #2  
Old 01-13-2020, 06:43 AM
kristof.taveirne kristof.taveirne is offline
Mirth Newb
 
Join Date: Apr 2010
Posts: 10
kristof.taveirne is on a distinguished road
Default

In 2020 I have the same question and I land on my own post

I have a HTTP receiver and a HTTP sender .... I need to copy the query from source to sender to pass it as is.

Is there a way to do this in a transformer?

Thank you,

Kristof.
Reply With Quote
  #3  
Old 01-18-2020, 11:40 AM
ricber ricber is offline
Mirth Guru
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 185
ricber
Default

Hi kristof.taveirne,

about your question on query parameter, I asume that you are using static query parameters in mirth interface. The way to generate manually query parameters is to create it in destination transformer as a string and then concatenate it to the address. In this way, if you do not receive any variable, you simply will add a '' to the url.

HTH,

RB
Reply With Quote
  #4  
Old 01-18-2020, 11:43 AM
ricber ricber is offline
Mirth Guru
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 185
ricber
Default

Hi kristof.taveirne,

about your question, please send a message to a http receiver and check variables in source. You will see the query in a mirth variable, simply retrieve it in destination and use it in http sender.

HTH,

RB


Quote:
Originally Posted by kristof.taveirne View Post
In 2020 I have the same question and I land on my own post

I have a HTTP receiver and a HTTP sender .... I need to copy the query from source to sender to pass it as is.

Is there a way to do this in a transformer?

Thank you,

Kristof.
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 02:16 PM.


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