You need to sign in to do that
Don't have an account?
Li Wang
How to use HTTP CALLOUT on a .csv document?
Hi,
I have a url which refers to a .csv file. That means if you put the url into your browser, you will download a .csv file.
But how can I use http callout to directly get the content of the .csv file?
I have tried httpresponse, but it does not work. I think it is because httpresponse can only parse Json or xml.
Thanks!
I have a url which refers to a .csv file. That means if you put the url into your browser, you will download a .csv file.
But how can I use http callout to directly get the content of the .csv file?
I have tried httpresponse, but it does not work. I think it is because httpresponse can only parse Json or xml.
Thanks!
First, make sure to put your endpoint in your remote settings so that Salesforce allows the callout. Then here is some code for a very simple POC I did for the same thing! My endpoint also was a direct link to download the CSV, using it like this as a GET allowed me to parse the CSV and use for record data.