Skip to content

HTTP requests from JavaScript #5157

Answered by pacmano1
elavy-harris asked this question in Q&A
Discussion options

You must be logged in to vote

If you want a transformer to make a http call you have to do that in java. There are examples in the forums for that.

As an alternative, and if the config data is persistent and might be used by more than one channel, you might consider using a single channel to source that configuration data and store it in a global map as an object.

The source tab can just be a JS reader that "returns true". In your destination, call the FHIR endpoint and in the response transformer assign the values needed to a $g object. Then reference that object as needed anywhere in any channel.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@elavy-harris
Comment options

@StefanScholte
Comment options

Answer selected by elavy-harris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants