One Star

tRest insert JSON into HTTP BODY

Can anyone tell me how to insert a payload into the HTTP BODY of the tRest component from the tFileOutputJSON component?
4 REPLIES
One Star

Re: tRest insert JSON into HTTP BODY

Hi
Welcome to Talend Community!
Could you show me more details?
Or i may misunderstand you.
Regards
Pedro
One Star

Re: tRest insert JSON into HTTP BODY

I am trying to figure out how to insert the output from tFileOutputJson component into the body of the tRest component to that I can send the JSON payload to a webservice api.
One Star

Re: tRest insert JSON into HTTP BODY

I am very interested in this as well. Currently I have a job that sends out XML in the HTTP payload using tREST. What I did was a generated the XML as a string and put it in a context variable that I then reference in tREST's HTTP body section. I believe you can do the same thing for JSON.
My question is how do you parse a JSON file after you download it from a webservice in the following format:
One Star

Re: tRest insert JSON into HTTP BODY

Good idea. Where can I find documentation on context variables?
As far as JSON is concerned there is nothing to parse. It is also a string and should be submitted as such without any line breaks or spaces