Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Net.​Http.​Headers.​HttpResponseHeaders
Assembly: System.Net.Http
Inheritance: object → HttpHeaders → HttpResponseHeaders
Implemented Interfaces
- Collections.​Generic.​IEnumerable`1 (Inherits: IEnumerable) Implemented by: HttpHeaders
Represents the collection of Response Headers as defined in RFC 2616.
Properties
public
HttpHeaderValueCollection<​string>
AcceptRanges
Gets the value of the <see langword="Accept-Ranges" /> header for an HTTP response.
public
TimeSpan?
Age
Gets or sets the value of the <see langword="Age" /> header for an HTTP response.
public
CacheControlHeaderValue
CacheControl
Gets or sets the value of the <see langword="Cache-Control" /> header for an HTTP response.
public
HttpHeaderValueCollection<​string>
Connection
Gets the value of the <see langword="Connection" /> header for an HTTP response.
public
bool?
ConnectionClose
Gets or sets a value that indicates if the <see langword="Connection" /> header for an HTTP response contains Close.
public
DateTimeOffset?
Date
Gets or sets the value of the <see langword="Date" /> header for an HTTP response.
public
EntityTagHeaderValue
ETag
Gets or sets the value of the <see langword="ETag" /> header for an HTTP response.
public
Uri
Location
Gets or sets the value of the <see langword="Location" /> header for an HTTP response.
public
HttpHeaderValueCollection<​NameValueHeaderValue>
Pragma
Gets the value of the <see langword="Pragma" /> header for an HTTP response.
public
HttpHeaderValueCollection<​AuthenticationHeaderValue>
ProxyAuthenticate
Gets the value of the <see langword="Proxy-Authenticate" /> header for an HTTP response.
public
RetryConditionHeaderValue
RetryAfter
Gets or sets the value of the <see langword="Retry-After" /> header for an HTTP response.
public
HttpHeaderValueCollection<​ProductInfoHeaderValue>
Server
Gets the value of the <see langword="Server" /> header for an HTTP response.
public
HttpHeaderValueCollection<​string>
Trailer
Gets the value of the <see langword="Trailer" /> header for an HTTP response.
public
HttpHeaderValueCollection<​TransferCodingHeaderValue>
TransferEncoding
Gets the value of the <see langword="Transfer-Encoding" /> header for an HTTP response.
public
bool?
TransferEncodingChunked
Gets or sets a value that indicates if the <see langword="Transfer-Encoding" /> header for an HTTP response contains chunked.
public
HttpHeaderValueCollection<​ProductHeaderValue>
Upgrade
Gets the value of the <see langword="Upgrade" /> header for an HTTP response.
public
HttpHeaderValueCollection<​string>
Vary
Gets the value of the <see langword="Vary" /> header for an HTTP response.
public
HttpHeaderValueCollection<​ViaHeaderValue>
Via
Gets the value of the <see langword="Via" /> header for an HTTP response.
public
HttpHeaderValueCollection<​WarningHeaderValue>
Warning
Gets the value of the <see langword="Warning" /> header for an HTTP response.
public
HttpHeaderValueCollection<​AuthenticationHeaderValue>
WwwAuthenticate
Gets the value of the <see langword="WWW-Authenticate" /> header for an HTTP response.
public
HttpHeadersNonValidated
NonValidated
Gets a view of the contents of this headers collection that does not parse nor validate the data upon access.
Methods
public
void
Add​(string name,
Collections.​Generic.​IEnumerable<​string> values)
Inherited from HttpHeaders
Adds the specified header and its values into the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection.
name
The header to add to the collection.
values
A list of header values to add to the collection.
public
void
Add​(string name,
string value)
Inherited from HttpHeaders
Adds the specified header and its value into the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection.
name
The header to add to the collection.
value
The content of the header.
public
void
Clear​()
Inherited from HttpHeaders
Removes all headers from the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection.
public
bool
Contains​(string name)
Inherited from HttpHeaders
Returns if a specific header exists in the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection.
Returns <see langword="true" /> if the specified header exists in the collection; otherwise <see langword="false" /> .
name
The specific header.
public
Collections.​Generic.​IEnumerator<​Collections.​Generic.​KeyValuePair<​string, Collections.​Generic.​IEnumerable<​string>>>
GetEnumerator​()
Inherited from HttpHeaders
Returns an enumerator that can iterate through the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> instance.
Returns An enumerator for the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> .
public
Collections.​Generic.​IEnumerable<​string>
GetValues​(string name)
Inherited from HttpHeaders
Returns all header values for a specified header stored in the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection.
Returns An array of header strings.
name
The specified header to return values for.
public
bool
Remove​(string name)
Inherited from HttpHeaders
Removes the specified header from the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection.
Returns <see langword="true" /> if <paramref name="name" /> is successfully removed; otherwise, <see langword="false" /> . This method also returns <see langword="false" /> if <paramref name="name" /> was not found in the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection or if <paramref name="name" /> is <see langword="null" /> .
name
The name of the header to remove from the collection.
public
string
ToString​()
Inherited from HttpHeaders
Returns a string that represents the current <see cref="T:System.Net.Http.Headers.HttpHeaders" /> object.
Returns A string that represents the current object.
public
bool
TryAddWithoutValidation​(string name,
Collections.​Generic.​IEnumerable<​string> values)
Inherited from HttpHeaders
Returns a value that indicates whether the specified header and its values were added to the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection without validating the provided information.
Returns <see langword="true" /> if the specified header <paramref name="name" /> and <paramref name="values" /> could be added to the collection; otherwise <see langword="false" /> .
name
The header to add to the collection.
values
The values of the header.
public
bool
TryAddWithoutValidation​(string name,
string value)
Inherited from HttpHeaders
Returns a value that indicates whether the specified header and its value were added to the <see cref="T:System.Net.Http.Headers.HttpHeaders" /> collection without validating the provided information.
Returns <see langword="true" /> if the specified header <paramref name="name" /> and <paramref name="value" /> could be added to the collection; otherwise <see langword="false" /> .
name
The header to add to the collection.
value
The content of the header.
public
bool
TryGetValues​(string name,
Collections.​Generic.​IEnumerable`1&? values)
Inherited from HttpHeaders
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object