HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    Method CreateUserAgent

    CreateUserAgent(string, string)

    Creates a user agent of the form of the default UserAgent: the specified product name and version followed by the operating system, such as MyApp/2.1.0 (Microsoft Windows 10.0.26100). Parentheses, backslashes and characters other than printable ASCII are replaced in the description of the operating system, which is left out if it is empty.

    Declaration
    protected static string CreateUserAgent(string productName, string productVersion)
    Parameters
    Type Name Description
    string productName

    The name of the product. It must be a token: one or more ASCII letters, digits and characters out of !#$%&'*+-.^_`|~.

    string productVersion

    The version of the product, such as 2.1.0. It must be a token, like the name.

    Returns
    Type Description
    string
    Exceptions
    Type Condition
    ArgumentException

    productName or productVersion is not a token.

    © Singulink. All rights reserved.