tRest insert JSON into HTTP BODY

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?
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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog