Issue
I'm attempting using curl to monitor the contents of a page served by a remote HTTP server (which I have very little control over), and for some reason the server is returning different results depending on what machine I'm running curl from. I suspect this might be due to a difference in the user agent strings curl is using on each machine.
How do I check (not set) what user agent string curl is sending to the remote server in its HTTP requests?
Solution
Use the --verbose
option to see all the headers sent by curl, including User-Agent
:
A line starting with '>' means "header data" sent by curl
For example:
$ curl --verbose 'http://www.google.com/'
> GET / HTTP/1.1
> User-Agent: curl/7.37.0
> Host: www.google.com
> Accept: */*
Answered By - TachyonVortex Answer Checked By - David Marino (WPSolving Volunteer)