Struct ResponseHeaders
- Namespace
- Auth0.ManagementApi.Core
- Assembly
- Auth0.ManagementApi.dll
Represents HTTP response headers with case-insensitive lookup.
public readonly struct ResponseHeaders : IEnumerable<HttpHeader>, IEnumerable
- Implements
- Inherited Members
Properties
ContentLength
Gets the Content-Length header value, if present.
public long? ContentLength { get; }
Property Value
- long?
ContentType
Gets the Content-Type header value, if present.
public string? ContentType { get; }
Property Value
Methods
Contains(string)
Checks if the headers contain a specific header name.
public bool Contains(string name)
Parameters
namestring
Returns
FromHttpResponseMessage(HttpResponseMessage)
Creates a ResponseHeaders instance from an HttpResponseMessage.
public static ResponseHeaders FromHttpResponseMessage(HttpResponseMessage response)
Parameters
responseHttpResponseMessage
Returns
GetEnumerator()
Gets an enumerator for all headers.
public IEnumerator<HttpHeader> GetEnumerator()
Returns
TryGetValue(string, out string?)
Tries to get a single header value. Returns the first value if multiple values exist.
public bool TryGetValue(string name, out string? value)
Parameters
Returns
TryGetValues(string, out IEnumerable<string>?)
Tries to get all values for a header.
public bool TryGetValues(string name, out IEnumerable<string>? values)
Parameters
namestringvaluesIEnumerable<string>