Table of Contents

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

string

Methods

Contains(string)

Checks if the headers contain a specific header name.

public bool Contains(string name)

Parameters

name string

Returns

bool

FromHttpResponseMessage(HttpResponseMessage)

Creates a ResponseHeaders instance from an HttpResponseMessage.

public static ResponseHeaders FromHttpResponseMessage(HttpResponseMessage response)

Parameters

response HttpResponseMessage

Returns

ResponseHeaders

GetEnumerator()

Gets an enumerator for all headers.

public IEnumerator<HttpHeader> GetEnumerator()

Returns

IEnumerator<HttpHeader>

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

name string
value string

Returns

bool

TryGetValues(string, out IEnumerable<string>?)

Tries to get all values for a header.

public bool TryGetValues(string name, out IEnumerable<string>? values)

Parameters

name string
values IEnumerable<string>

Returns

bool