www.delorie.com/gnu/docs/kawa/kawa_88.html   search  
 
Buy GNU books!


Kawa, the Java-based Scheme system

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.5 Functions for generating HTTP responses

Function: unescaped-data data
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.

Function: response-header key value
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.

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


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003