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