Node:HTTP response, Previous:HTTP requests, Up:XML tools



Functions for generating HTTP responses

unescaped-data data Function
Creates a special value which causes data to be printed, as is, without normal escaping. For example, when the output format is XML, then printing "<?xml?>" prints as &lt;?xml?&gt;, but (unescaped-data "<?xml?>") prints as <?xml?>.

If using plain Scheme, you need to do the following before using these functions.

(require 'http)
This is not needed for KRL or XQuery.

response-header key value Function
Create the response header key: value in the HTTP response. The result is a "response header value" (of some unspecified type). It does not directly set or print a response header, but only does so when you actually "print" its value to the response output stream.

response-content-type type Function
Species the content-type of the result - for example "text/plain". Convenience function for (response-header "Content-Type" type).