How to set the User-Agent string using Curl

To set the User-Agent string with Curl, you need to use the -A or --user-agent command-line option. When you use Curl to send an HTTP request, it sends the User-Agent string information in the “curl/version.number” format. The default header value in User-Agent: curl/7.54.1. In this example, we are set the User-Agent string to the ReqBin echo URL. Click Run to execute the Curl User-Agent example online and see the results.
Loading...