04-15-2020 09:31 AM
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
04-16-2020 06:01 PM
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.
04-17-2020 05:45 AM
Thank you very much Patrick! You explanation is very interesting.