Skip to main content
Solved

How to fetch data from HTTPCaller "_response_body"

  • October 11, 2021
  • 5 replies
  • 204 views

robertr
Contributor
Forum|alt.badge.img+6

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

 

 

Best answer by nielsgerrits

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

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
  • Best Answer
  • October 11, 2021

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


robertr
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 12, 2021

@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,


nielsgerrits
VIP
robertr wrote:

@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.


mattwilkie
Supporter
Forum|alt.badge.img+11
  • Supporter
  • May 3, 2023
nielsgerrits wrote:

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?


mattwilkie
Supporter
Forum|alt.badge.img+11
  • Supporter
  • May 4, 2023
mattwilkie wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings