httpreason
httpreason |
Purpose
Synopsis
function httpreason(code:integer):string
Argument
code
|
HTTP status code (see Section
Constants for a list of predefined status code constants)
|
Return value
Text associated to the provided status code or an empty string if the code is unknown
Example
The following displays
"Bad Request":
writeln(httpreason(400))
Further information
The HTTP standard specifies a set of predefined status codes. This function returns the text associated with a given code. For instance, upon success a request will reply with code 200 (
"OK") or 204 (
"No Content").
Module