Solved

How to fetch data from HTTPCaller "_response_body"

  • 11 October 2021
  • 5 replies
  • 26 views

Badge +2

Hello FME Community,

Although I was very happy to have successfully used HTTPCaller for the first time by writing the data to a CSV file, I seem to be stuck in using HTTPCaller to read the data from the "_response_body" to continue the processing.

 

I can see the data loaded in the "_response_body" but I couldn't manage to pull it out to continue the processing (tried FeatureReader, TempPathnameCreator, AttributeFileWriter). I always fail to pull the data.

 

Can anyone help me out with an example of usage? I read the documentation, forum posts and other internet posts but I still fail to use it as exemplified below.

 

Basically, I would like to replace the CSVReader (below) with the HTTPCaller data, as to load the data automatically and not have to download manually the CSV file every time.

Current schemaBelow, the successful usage of HTTPCaller, but with a resulting file.

HTTPCaller OKMany thanks for your time,

Robert

 

 

icon

Best answer by nielsgerrits 11 October 2021, 21:22

View original

5 replies

Userlevel 6
Badge +31

Sure, here you go. I had some issues with another CSV which is probably caused by the encoding, so if you run into something share a sample of your CSV so we can reproduce it.

2021-10-12_05h20_11

Badge +2

@nielsgerrits​ 

Many thanks! it worked on the first run.

Really appreciate the help - I am sure I would have spent weeks to finally solve this.

 

Have a great week,

Userlevel 6
Badge +31

@nielsgerrits​ 

Many thanks! it worked on the first run.

Really appreciate the help - I am sure I would have spent weeks to finally solve this.

 

Have a great week,

Cheers 🙂 happy it works for you.

Badge +8

Sure, here you go. I had some issues with another CSV which is probably caused by the encoding, so if you run into something share a sample of your CSV so we can reproduce it.

2021-10-12_05h20_11

is there a way to read from the response body directly instead of saving a temp csv file first? Or saving the csv file to memory instead of disk?

Badge +8

is there a way to read from the response body directly instead of saving a temp csv file first? Or saving the csv file to memory instead of disk?

added as an idea: https://community.safe.com/s/bridea/a0rDm000000DhuHIAS/featurereader-read-from-directly-httpcaller-response-body

Reply