Table of Contents

THttpHeaders.GetIfExists Method

Retrieves the value of the named header if it exists.

Syntax

Unit: Sparkle.Http.Headers

function THttpHeaders.GetIfExists(const HeaderName: string; var HeaderValue: string): Boolean;

Parameters

<-> Parameter Type Description
const HeaderName string The header name to look up (case-insensitive).
var HeaderValue string Receives the header value when the header exists.

Returns

True if the header exists and HeaderValue was set; otherwise False.

See also