cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Reading an http file in csv format

bepelletier
New Contributor II

I want to read this csv file โ€œhttp://api.pluralsight.com/api-v0.9/coursesโ€ into a snap
When I used mapper and file reader, I obtained this error message:
Failure: Unable to read from http://api.pluralsight.com/api-v0.9/courses, Reason: The file can not be accessed: http://api.pluralsight.com/api-v0.9/courses, Resolution: Verify that access permissions are granted on the file: http://api.pluralsight.com/api-v0.9/courses

6 REPLIES 6

You can use the curl command-line utility to see how the server responds differently depending on the value of the User-Agent header. Try these:

curl -v -L http://api.pluralsight.com/api-v0.9/courses -o courses.csv -H โ€œUser-Agent: Java/11.0.7โ€

curl -v -L http://api.pluralsight.com/api-v0.9/courses -o courses.csv -H โ€œUser-Agent: Java/1.8โ€

The first command successfully retrieves the csv file. The second fails with a 403 Forbidden response.

bepelletier
New Contributor II

Thank you very much Patrick! You explanation is very interesting.

image001.jpg