Initializing help system before first use

httpreply

httpreply


Purpose
Reply to an HTTP request with a file.
Synopsis
procedure httpreply(reqid:integer)
procedure httpreply(reqid:integer, fname:string)
procedure httpreply(reqid:integer, fname:string|text, xhdr:string|text)
Arguments
reqid 
Request number
fname 
Name of the file holding the response data
xhdr 
Additional headers to include in the response
Further information
1. This procedure replies to the specified request sending the provided file and using 200 ( 'OK') as the HTTP status code.
2. The first form of the procedure is the same as providing an empty file name with the second form: in this case no data is sent to the client and the returned status code becomes 204 ( 'No Content').
3. If the specified request is of type HEAD (see httphead) this procedure sends only the header part of the result.
Related topics
Module