ApiVersionHandler Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A delegating handler that adds the api-version query parameter to the request URI.
public class ApiVersionHandler : System.Net.Http.DelegatingHandler
type ApiVersionHandler = class
inherit DelegatingHandler
Public Class ApiVersionHandler
Inherits DelegatingHandler
- Inheritance
-
ApiVersionHandler
Constructors
| Name | Description |
|---|---|
| ApiVersionHandler(String) |
Initializes a new instance of the ApiVersionHandler class with the optional API version. |
Fields
| Name | Description |
|---|---|
| ApiVersion |
The default API version to use if none is specified. |
| ApiVersionQueryString |
The name of the query parameter used to specify the API version. |
| UserAgentHeader |
The name of the User-Agent header. |
| UserAgentHeaderValue |
The value of the User-Agent header, which includes the assembly name and version. |
Methods
| Name | Description |
|---|---|
| SendAsync(HttpRequestMessage, CancellationToken) |
Adds the api-version query parameter to the request URI if it is not already present. |