REST to download a csv file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2021 06:27 PM
I have an outbound REST call made to another application , Which then submits a Job and provides the response as a link to download the CSV file.
Is there anyway to do a REST call to download/read this CSV file from the link provided.
I need to read 3 columns from this csv file and then do some data validation before inserting into table.
I am looking into doing a REST call with a StreamWriter. But could not find any examples.
Can you please provide an example for doing this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2021 06:50 PM
Use Import Set. You can point from where to import your file, as path , etc and how to handle the data. Just check System Import Sets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2021 08:54 PM
-
- Set the response's content type to text/csv .
- Use HttpHeaders.
- Use response writer ( response.
- Use write() method of StatefulBeanToCsv instance to write a list of users to CSV file.
- Afterwards, the data is pushed to the client where the browser downloads the attached users.