HttpExpectationHeaderValue
HttpExpectationHeaderValue
HttpExpectationHeaderValue
HttpExpectationHeaderValue
Class
Definition
Represents a token for a particular server behavior required by the client that is used in the Expect HTTP header on an HTTP request.
public : sealed class HttpExpectationHeaderValue : IStringable, IHttpExpectationHeaderValuepublic sealed class HttpExpectationHeaderValue : IStringable, IHttpExpectationHeaderValuePublic NotInheritable Class HttpExpectationHeaderValue Implements IStringable, IHttpExpectationHeaderValue// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
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
HttpExpectationHeaderValue(String) HttpExpectationHeaderValue(String) HttpExpectationHeaderValue(String) HttpExpectationHeaderValue(String)
Initializes a new instance of the HttpExpectationHeaderValue class with a name.
public : HttpExpectationHeaderValue(PlatForm::String name)public HttpExpectationHeaderValue(String name)Public Sub New(name As String)// You can use this method in JavaScript.
- name
- PlatForm::String String String String
A token that represents a name used in the Expect HTTP header.
- See Also
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(PlatForm::String name, PlatForm::String value)public HttpExpectationHeaderValue(String name, String value)Public Sub New(name As String, value As String)// You can use this method in JavaScript.
- name
- PlatForm::String String String String
A token that represents a name used in the Expect HTTP header.
- value
- PlatForm::String String String String
A value for the name used in the Expect HTTP header.
- See Also
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 : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string// You can use this property in JavaScript.
- Value
- PlatForm::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 IList<HttpNameValueHeaderValue> Parameters { get; }Public ReadOnly Property Parameters As IList<HttpNameValueHeaderValue>// You can use this property in JavaScript.
- Value
- IVector<HttpNameValueHeaderValue> IList<HttpNameValueHeaderValue> IList<HttpNameValueHeaderValue> IList<HttpNameValueHeaderValue>
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 : PlatForm::String Value { get; set; }public string Value { get; set; }Public ReadWrite Property Value As string// You can use this property in JavaScript.
- Value
- PlatForm::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(PlatForm::String input)public static HttpExpectationHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpExpectationHeaderValue// You can use this method in JavaScript.
- input
- PlatForm::String String String String
A string that represents the information in the Expect HTTP header.
An HttpExpectationHeaderValue instance.
Remarks
Below are the exceptions that this function throws.
E_INVALIDARG
The input parameter is null (Nothing in Visual Basic).
The input parameter is not valid expect information.
ToString() ToString() ToString() ToString()
Returns a string that represents the current HttpExpectationHeaderValue object.
public : PlatForm::String ToString()public string ToString()Public Function ToString() As string// You can use this method in JavaScript.
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 PlatForm::Boolean TryParse(PlatForm::String input, HttpExpectationHeaderValue expectationHeaderValue)public static bool TryParse(String input, HttpExpectationHeaderValue expectationHeaderValue)Public Static Function TryParse(input As String, expectationHeaderValue As HttpExpectationHeaderValue) As bool// You can use this method in JavaScript.
- input
- PlatForm::String String String String
The string to validate.
- expectationHeaderValue
- HttpExpectationHeaderValue HttpExpectationHeaderValue HttpExpectationHeaderValue HttpExpectationHeaderValue
The HttpExpectationHeaderValue version of the string.
true if input is valid HttpExpectationHeaderValue information; otherwise, false.