$Web Input Header: Difference between revisions
(Created page with "{{DISPLAYTITLE:$Web_Input_Header}} <span class="pageSubtitle">Retrieve web request header contents</span> <var>$Web_Input_Header</var> retrieves the raw web request headers s...") |
(→Syntax) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 18: | Line 18: | ||
<td>The data is to be left unchanged.</td></tr> | <td>The data is to be left unchanged.</td></tr> | ||
<tr><th>TextUtf8</th> | <tr><th>TextUtf8</th> | ||
<td>The data is UTF-8 and is to be converted to EBCDIC: each | <td>The data is UTF-8 and is to be converted to EBCDIC: each UTF-8 sequence is converted to the corresponding Unicode character, which is then translated to EBCDIC using the translation table in effect for the Online as defaulted or set by the [[UNICODE command]]. | ||
</td></tr> | </td></tr> | ||
</table> | </table> | ||
Line 25: | Line 25: | ||
</table> | </table> | ||
<var>$Web_Input_Header</var> can be used to examine data from the client if the <var>[[ | <var>$Web_Input_Header</var> can be used to examine data from the client if the <var>[[RAWHEADER_(JANUS_DEFINE_parameter)|RAWHEADER]]</var> parameter is set on the port definition. | ||
Web request header parameters are always separated by ASCII carriage-return/line-feed (X'0D0A') pairs. As such, an application using <var>$Web_Input_Header</var> would probably want to parse the returned 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 request header parameters are always separated by ASCII carriage-return/line-feed (X'0D0A') pairs. As such, an application using <var>$Web_Input_Header</var> would probably want to parse the returned 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). | ||
<var>$Web_Input_Header</var> is available only in Versions 7.5 and later of | <var>$Web_Input_Header</var> is available only in Versions 7.5 and later of <var class="product">Model 204</var>. | ||
See also <var>[[$Web_Input_Content]]</var>, <var>[[$Web_Output_Content]]</var>, and <var>[[$Web_File_Content]]</var>. | See also <var>[[$Web_Input_Content]]</var>, <var>[[$Web_Output_Content]]</var>, and <var>[[$Web_File_Content]]</var>. | ||
[[Category:Janus Web Server $functions|$Web_Input_Header]] | [[Category:Janus Web Server $functions|$Web_Input_Header]] |
Latest revision as of 12:54, 22 July 2020
Retrieve web request header contents
$Web_Input_Header retrieves the raw web request headers sent by a client. $Web_Input_Header returns this content as a longstring.
Syntax
%lstr = $Web_Input_Header( [type] )
$Web_Input_Header 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_Header can be used to examine data from the client if the RAWHEADER parameter is set on the port definition.
Web request header parameters are always separated by ASCII carriage-return/line-feed (X'0D0A') pairs. As such, an application using $Web_Input_Header would probably want to parse the returned 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_Header is available only in Versions 7.5 and later of Model 204.
See also $Web_Input_Content, $Web_Output_Content, and $Web_File_Content.