httpUserAgent static method

String httpUserAgent(
  1. String userAgent
)

Override the name and version of the application as provided to the HTTP server, i.e. the HTTP "User-Agent". Name and version must be separated by a forward slash, e.g. "FooBar/1.2.3".

Implementation

static String httpUserAgent(String userAgent) {
  // Use colon (:) instead of dashes.
  // See https://stackoverflow.com/a/52127734/109747
  return ':http-user-agent=$userAgent';
}