HttpExpectationHeaderValue HttpExpectationHeaderValue HttpExpectationHeaderValue HttpExpectationHeaderValue Class

Represents a token for a particular server behavior required by the client that is used in the Expect HTTP header on an HTTP request.

Syntax

Declaration

public sealed class HttpExpectationHeaderValuepublic sealed class HttpExpectationHeaderValuePublic NotInheritable Class HttpExpectationHeaderValuepublic sealed class HttpExpectationHeaderValue

Remarks

The HttpExpectationHeaderValue class is a token that represents a particular server behavior that is required by the client. The HttpExpectationHeaderValue is used in the Expect HTTP header on an HTTP request.

For example, 100-continue is a server behavior that the client might depend on and set using the HttpExpectationHeaderValue class.

The Expect property on the HttpRequestHeaderCollection returns an HttpExpectationHeaderValueCollection that contains HttpExpectationHeaderValue objects.

Constructors summary

Initializes a new instance of the HttpExpectationHeaderValue class with a name.

Initializes a new instance of the HttpExpectationHeaderValue class with a name and value for the name.

Properties summary

Gets or sets a token that represents a name for a server behavior used in the Expect HTTP header.

Gets a set of parameters for a server behavior included in the Expect HTTP header.

Gets or sets a value for a server behavior used in the Expect HTTP header.

Methods summary

Converts a string to an HttpExpectationHeaderValue instance.

Returns a string that represents the current HttpExpectationHeaderValue object.

Determines whether a string is valid HttpCredentialsHeaderValue information.

Constructors

  • HttpExpectationHeaderValue(String)
    HttpExpectationHeaderValue(String)
    HttpExpectationHeaderValue(String)
    HttpExpectationHeaderValue(String)

    Initializes a new instance of the HttpExpectationHeaderValue class with a name.

    public HttpExpectationHeaderValue(String name)public New(String name)Public Sub New(name As String)public HttpExpectationHeaderValue(String name)

    Parameters

    • name
      System.String
      System.String
      System.String
      System.String

      A token that represents a name used in the Expect HTTP header.

  • HttpExpectationHeaderValue(String, String)
    HttpExpectationHeaderValue(String, String)
    HttpExpectationHeaderValue(String, String)
    HttpExpectationHeaderValue(String, String)

    Initializes a new instance of the HttpExpectationHeaderValue class with a name and value for the name.

    public HttpExpectationHeaderValue(String name, String value)public New(String name, String value)Public Sub New(name As String, value As String)public HttpExpectationHeaderValue(String name, String value)

    Parameters

    • name
      System.String
      System.String
      System.String
      System.String

      A token that represents a name used in the Expect HTTP header.

    • value
      System.String
      System.String
      System.String
      System.String

      A value for the name used in the Expect HTTP header.

Properties

  • Name
    Name
    Name
    Name

    Gets or sets a token that represents a name for a server behavior used in the Expect HTTP header.

    public string Name { get; }public string Name { get; }Public ReadOnly Property Name As stringpublic string Name { get; }

    Property Value

    • string
      string
      string
      string

      A token that represents the name for a server behavior.

    Remarks

    An example of a Name property would be a string that contains 100-continue, which repreesnts a server behavior that the client might depend on.

  • Parameters
    Parameters
    Parameters
    Parameters

    Gets a set of parameters for a server behavior included in the Expect HTTP header.

    public IVector<HttpNameValueHeaderValue> Parameters { get; }public IVector<HttpNameValueHeaderValue> Parameters { get; }Public ReadOnly Property Parameters As IVector<HttpNameValueHeaderValue>public IVector<HttpNameValueHeaderValue> Parameters { get; }

    Property Value

    • A set of parameters for a server behavior.

    Remarks

    A given server behavior might not allow parameters and the Parameters property would be an empty list. For example, 100-continue is never used with parameters.

  • Value
    Value
    Value
    Value

    Gets or sets a value for a server behavior used in the Expect HTTP header.

    public string Value { get; set; }public string Value { get; set; }Public ReadWrite Property Value As stringpublic string Value { get; set; }

    Property Value

    • string
      string
      string
      string

      A value for a server behavior used in the Expect HTTP header.

    Remarks

    A given server behavior might not require a value and the Value property would be an empty string. For example, 100-continue is never used with a value.

Methods

  • Parse(String)
    Parse(String)
    Parse(String)
    Parse(String)

    Converts a string to an HttpExpectationHeaderValue instance.

    public static HttpExpectationHeaderValue Parse(String input)public static HttpExpectationHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpExpectationHeaderValuepublic static HttpExpectationHeaderValue Parse(String input)

    Parameters

    • input
      System.String
      System.String
      System.String
      System.String

      A string that represents the information in the Expect HTTP header.

    Returns

  • ToString()
    ToString()
    ToString()
    ToString()

    Returns a string that represents the current HttpExpectationHeaderValue object.

    public string ToString()public string ToString()Public Function ToString() As stringpublic string ToString()

    Returns

    • string
      string
      string
      string

      A string that represents the current object.

  • TryParse(String, HttpExpectationHeaderValue)
    TryParse(String, HttpExpectationHeaderValue)
    TryParse(String, HttpExpectationHeaderValue)
    TryParse(String, HttpExpectationHeaderValue)

    Determines whether a string is valid HttpCredentialsHeaderValue information.

    public static bool TryParse(String input, HttpExpectationHeaderValue expectationHeaderValue)public static bool TryParse(String input, HttpExpectationHeaderValue expectationHeaderValue)Public Static Function TryParse(input As String, expectationHeaderValue As HttpExpectationHeaderValue) As boolpublic static bool TryParse(String input, HttpExpectationHeaderValue expectationHeaderValue)

    Parameters

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Web.Http.Headers.dll