Skip to content

SetResponseStatus - cWebHttpHandler

Use this function to set the response status code

Type: Procedure

Parameters

Parameter Type Description
usStatusCode UShort Short containing the status code.
sReason String String with description of the reason (like "OK" or "Not found").
usStatusSubCode UShort Subcode for the status (sent as the decimal like 500.3) usually used for internal error codes.

Syntax

Procedure SetResponseStatus UShort usStatusCode String sReason UShort usStatusSubCode

Call Example

Send SetResponseStatus usStatusCode sReason usStatusSubCode

Description

Use this function to set the response status code.

Examples of status codes are 200 (OK), 500 (error), 404 (not found).

If this function is not called, the response will get status 200.

Note that this procedure should be called before data is written to the response body (OutputString / OutputUChar).