Skip to main content
Solved

How to fetch data from HTTPCaller "_response_body"

  • October 11, 2021
  • 5 replies
  • 360 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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+61
  • 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
Forum|alt.badge.img+61

@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
Enthusiast
Forum|alt.badge.img+11
  • Enthusiast
  • May 3, 2023

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
Enthusiast
Forum|alt.badge.img+11
  • Enthusiast
  • May 4, 2023

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