httpreplycode
httpreplycode |
Purpose
Reply to an HTTP request only with a status code.
Synopsis
procedure httpreplycode(reqid:integer, code:integer)
procedure httpreplycode(reqid:integer, code:integer, msg:string)
procedure httpreplycode(reqid:integer, code:integer, msg:string, xhdr:string|text)
Arguments
reqid
|
Request number
|
code
|
HTTP status code to be returned (see Section
Constants for a list of predefined status code constants)
|
msg
|
Explanation text
|
xhdr
|
Additional headers to include in the response
|
Further information
1. This procedure replies to the specified request using the provided code that should be a valid HTTP status (
i.e. 3 digit number).
2. Unless the provided code is 204 (
No Content) a basic HTML page is generated as the data associated to the response including the standard reason (
e.g.
Bad Request for code 400) as well as the given explanation text.
3. If the specified request is of type HEAD (see
httphead) this procedure sends only the header part of the result.
Related topics
Module