tHttpRequest not giving same results as Postman/JS script

Five Stars

tHttpRequest not giving same results as Postman/JS script

Hi everyone,

 

I'm trying to recreate the logic of a Node JS script in Talend. The script runs calls on GameAnalytics API. A screenshot is attached and the logic is:

 

  1. Request an authentication token (works fine)
  2. Request a list of games with info about them (works fine)
  3. Request URLs for each game (doesn't work)
  4. Fetch the file at the URL (doesn't work because of step 4)

Where I'm struggling is for the 3rd API call that uses 10 parameters (see a screenshot for the JS script and Postman setup). Both the script and Postman return data (an array of URLs) but Talend doesn't give anything. I checked the values passed as parameters and that I'm getting from the globalMap and they look good. When I take the same parameters used in Talend and use them in Postman, it works.

 

So is there anything I should set differently to make this job run? How different are the calls done with a tHttpRequest VS Node JS libraries and Postman?

 

Any help appreciated!

 

Best,

 

Antoine

Highlighted
Forteen Stars

Re: tHttpRequest not giving same results as Postman/JS script

Hi,

 

Why you decide - API does not work?

as I can see from attached screenshots - it tExtractJSON returns 0,  but response contain data

may be an error just in parse JSON settings?

 

what is the response file after tReplicate?

 

cheers

-----------
Five Stars

Re: tHttpRequest not giving same results as Postman/JS script

So when I tested yesterday the file containing the response was empty, no rows. Now I've tested again and it contains what's shown in the attached picture. Not sure what this format is to be honest. Some kind of encoding?

 

Also I noticed the JS script was using a "gzip: true" parameter but I didn't specify anything except accepted encodings in the headers. Please see attached the tHttpRequest component parameters.

 

I'm not a huge Talend user so please forgive my lack of knowledge here Smiley Happy

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now