Afaik the HTTP-node has no way to retain input data , so using it in-line always requires some way to merge the results back with the input (e.g what is covered here: HTTP Request Keep Data). This is usually fine, as long as you have consistency in what you are expecting from the HTTP.
So how about if you wanted to use the HTTP node for something else, like validating an image-content type or similar.
How do you properly merge it back with the original data as complexity after the HTTP-request increases? I can think of ways, but I have a feeling that I’m overthinking it or that I’ve missed out on something basic here.
Please share your workflow
Example workflow: OK until something comes up invalid after which chaos and desync obviously ensues.
Edited to incl mock data.
Welcome to the community
In your example what are you trying to merge back? I would also wonder if the workflow needs the split in batches node as most of the nodes will loop once for each input item so you could likely skip the split in batches and go to the Get Image > If and process from there.
1Thanks for getting back to me!
What I am trying to achieve here is actually to use the HTTP node as a gatekeeper for the mock data.
E.g Input 2 of the merge node (which is just the mock data) should be passed on to “Do stuff with payload” if “Invalid?” is false.
- Get a full json object
- Specific field in Json contains an URL
- Check that URL against various criteria using HTTP nodes
- If no issues was found → Pass on the full json object
Turns out I was just overlooking basic concepts here, thanks for the help though - helped me reframe what I was looking to do enough to get me on the right track.
The way I ended up solving it was to simply merge the binary with the json and do all checking on the http headers after that merge:
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.