Sign in Join
FPDoc Onlineexperiment

GetHTTPStatusText function

In unit HTTPProtocol

Returns descriptive text for HTTP status codes.

Declaration

pascal
function GetHTTPStatusText(ACode: Cardinal; aUppercase: Boolean=False)
: string

Arguments

ACode

The HTTP status code number.

aUppercase

Whether to return uppercase text.

Function result

The descriptive text for the status code.

Description

Converts numeric HTTP status codes (100-599) to their standard descriptive text. Supports all common HTTP status codes including informational, success, redirection, client error, and server error responses. Returns "Unknown status: XXX" for unrecognized codes.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.