Skip to main content
Version: Early Access

HTTP User-Agent Header

In general, a User-Agent header identifies the client software originating an HTTP request, even when the client is not operated by a user. Browsers usually set the User-Agent header automatically. Even if you are writing your own code, the HTTP library you use will probably send an automatic User-Agent header. For Digital.ai Agility, it can be helpful to system administrators if your own code is uniquely identified by the User-Agent header. Agility monitors the HTTP logs for hosted customers so a unique User-Agent string helps with pro-active monitoring and troubleshooting.

The HTTP specification for the User-Agent header leaves a lot of room for variation. Agility recommends you override the default User-Agent header in an HTTP request made from your own application. You should construct the User-Agent string by appending your product's name and version to the name and version of the HTTP libraries you use.

Consider the following example for curl.

curl --user-agent "curl -V|head -n 1 StoryReport/1.0" -u remote:remote https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Story?page=10,0

This will generate a header that resembles the following.

            User-Agent: curl 7.30.0 (i386-pc-win32) libcurl/7.30.0 OpenSSL/0.9.8y zlib/1.2.7 StoryReport/1.0

Platform concepts