$Web Input Content: Difference between revisions
m (1 revision) |
m (1 revision) |
||
Line 4: | Line 4: | ||
$Web_Input_Content retrieves the "content" of an HTTP Put or Post sent by a client. <var>$Web_Input_Content</var> returns this content as a longstring. | <var>$Web_Input_Content</var> retrieves the "content" of an HTTP Put or Post sent by a client. <var>$Web_Input_Content</var> returns this content as a longstring. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> %LSTR = $Web_Input_Content( type ) | <p class="syntax"><section begin="syntax" /> %LSTR = $Web_Input_Content( type ) | ||
<section end="syntax" /></p> | <section end="syntax" /></p> | ||
$Web_Input_Content takes a single optional argument and returns a longstring. | <var>$Web_Input_Content</var> takes a single optional argument and returns a longstring. | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 27: | Line 27: | ||
</table> | </table> | ||
$Web_Input_Content can be used to examine data from the client in the following situations: | <var>$Web_Input_Content</var> can be used to examine data from the client in the following situations: | ||
<ul> | <ul> | ||
Line 39: | Line 39: | ||
Having the input content as a single longstring might be inconvenient for many applications, especially if the data is line-oriented. It is the application's responsibility to parse this longstring using longstring parsing functions (see [[Longstrings#Longstrings and $functions|"Longstrings and $functions"]] or [[Stringlist class]] parsing methods (the <var>[[ParseLines (Stringlist subroutine)|ParseLines]]</var> method is likely to be particularly helpful). | Having the input content as a single longstring might be inconvenient for many applications, especially if the data is line-oriented. It is the application's responsibility to parse this longstring using longstring parsing functions (see [[Longstrings#Longstrings and $functions|"Longstrings and $functions"]] or [[Stringlist class]] parsing methods (the <var>[[ParseLines (Stringlist subroutine)|ParseLines]]</var> method is likely to be particularly helpful). | ||
$Web_Input_Content is available only in Versions 6.7 and later of the <var class="product">Sirius Mods</var>. | <var>$Web_Input_Content</var> is available only in Versions 6.7 and later of the <var class="product">Sirius Mods</var>. | ||
See also <var>[[$Web_Output_Content]]</var> and <var>[[$Web_File_Content]]</var>. | See also <var>[[$Web_Output_Content]]</var> and <var>[[$Web_File_Content]]</var>. | ||
[[Category:Janus Web Server $functions|$Web_Input_Content]] | [[Category:Janus Web Server $functions|$Web_Input_Content]] |
Revision as of 22:43, 18 October 2012
<section begin="desc" />Retrieve input contents<section end="desc" />
$Web_Input_Content retrieves the "content" of an HTTP Put or Post sent by a client. $Web_Input_Content returns this content as a longstring.
Syntax
<section begin="syntax" /> %LSTR = $Web_Input_Content( type ) <section end="syntax" />
$Web_Input_Content takes a single optional argument and returns a longstring.
type | A case-independent string set to one of the following:
type is an optional argument, and it defaults to Binary. |
---|
$Web_Input_Content can be used to examine data from the client in the following situations:
- An HTTP Put.
- An HTTP Post where the mime-type is set to something other thanapplication/x-www-form-urlencoded or multipart/form-data.
- Any HTTP Post if the RAWINPUT parameter () is set on the port definition.
Text data retrieved by $Web_Input_Content is not affected by the setting of the JANUS DEFINE, JANUS WEB ON, or $Web_ProcSend parameters CR, LF, or CRLF. But to facilitate subsequent parsing, ASCII carriage returns (X'0D') and linefeeds (X'0A') that a client sends as line-separators are translated by $Web_Input_Content to EBCDIC carriage returns (X'0D') and linefeeds (X'25').
Having the input content as a single longstring might be inconvenient for many applications, especially if the data is line-oriented. It is the application's responsibility to parse this longstring using longstring parsing functions (see "Longstrings and $functions" or Stringlist class parsing methods (the ParseLines method is likely to be particularly helpful).
$Web_Input_Content is available only in Versions 6.7 and later of the Sirius Mods.
See also $Web_Output_Content and $Web_File_Content.