HTTP Request Keep Data

Hello there!

I have a workflow that produces some JSON data. I want o call a WebService via the HttpRequest node multiple time to make some lookups in the json data.

With HttpRequest the output is always just he return of the Request. Is ther a way t keep the Source/input of that node?

If not I will go for a funtion node and do a node-fetch request and manipulte the data there.

Regards Sebastian

No that is not possible. But what you can do is to add a Merge-Node after it. With it, you can then merge together the data from before the HTTP Noded and of it.

The “Mode” should be set to “Merge By Index” on the Merge node.

So something like that:
Screenshot from 2021-02-11 09-43-51

1 Like

That fits requirement!

Happy to hear!

Have fun!

Hello @jan ,
There seem to be an issue with this when requests are not taking the same amount of time.
For example if the first requests takes 5 seconds, and the second one only one, results by position will get mixed up.
Do you have another solution to propose please?
Thanks in advance

Welcome to the community @HaroldCarrelBilliard!

That is honestly surprising and should not happen. How does your workflow look like? Can you share a workflow that displays that behavior?

Is there just one input connection on each input of the Merge-Node?

My workflow looks like this, I modified the data a bit, but:
First call is done with 1000 elements (takes around 15 secondes), the second one with 663 (takes around 7 seconds, but in the merge, it is the opposite (but the call with 1000 elements takes more time)

(I can’t upload my workflow with data because it is too big. and I can’t upload json or txt files…).