Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpProductInfoHeaderValue class

Applies to Windows and Windows Phone

Represents product information used in the User-Agent HTTP header on an HTTP request.

Syntax


var httpProductInfoHeaderValue = new Windows.Web.Http.Headers.HttpProductInfoHeaderValue(string);
var httpProductInfoHeaderValue = new Windows.Web.Http.Headers.HttpProductInfoHeaderValue(string, string);

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

Members

The HttpProductInfoHeaderValue class has these types of members:

Constructors

The HttpProductInfoHeaderValue class has these constructors.

ConstructorDescription
HttpProductInfoHeaderValue(String) Initializes a new instance of the HttpProductInfoHeaderValue class with a product comment.
HttpProductInfoHeaderValue(String, String) Initializes a new instance of the HttpProductInfoHeaderValue class with a product name and version.

 

Methods

The HttpProductInfoHeaderValue class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Parse Converts a string to an HttpProductInfoHeaderValue instance.
ToString Returns a string that represents the current HttpProductInfoHeaderValue object.
TryParse Determines whether a string is valid HttpProductInfoHeaderValue information.

 

Properties

The HttpProductInfoHeaderValue class has these properties.

PropertyAccess typeDescription

Comment

Read-onlyGets the product comment from the HttpProductInfoHeaderValue used in the User-Agent HTTP header.

Product

Read-onlyGets the product from the HttpProductInfoHeaderValue used in the User-Agent HTTP header.

 

Remarks

The HttpProductInfoHeaderValue class represents product information used in the User-Agent HTTP header on an HTTP request.

The User-Agent header contains information about the user agent originating the request. The User-Agent header can contain multiple product tokens, each followed by optional comments which together identify the user agent and any sub-products. By convention, the product identifiers are listed in decreasing order of their significance for identifying the user agent software. Each product identifier consists of a name and optional version.

Each instance of the HttpProductInfoHeaderValue contains either a value for the Product or Comment property, but not both simultaneously.

The UserAgent property on the HttpRequestHeaderCollection returns an HttpProductInfoHeaderValueCollection that contains HttpProductInfoHeaderValue objects.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.winmd

See also

HttpProductInfoHeaderValueCollection
HttpRequestHeaderCollection
IStringable
Object
UserAgent

 

 

Show:
© 2014 Microsoft