Initializing help system before first use

# 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)`
`procedure httpreply(reqid:integer, code:integer, fname:string|text, xhdr:string|text)`
Arguments

reqid | Request number
code | 0 or HTTP status code to be returned (see Section Constants for a list of predefined status code constants)
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 (if no code is given or if its value is 0).
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.
4. An IO error will be raised if the response file cannot be accessed.
Related topics
httpreplycode, httpreplyjson, mksetcookie.
Module
mmhttp
Parent Topic Procedures and functions

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.