$Web Hdr Parm: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
Line 3: | Line 3: | ||
$Web_Hdr_Parm retrieves the value of a request header field. | |||
$Web_Hdr_Parm takes four arguments and returns a string, or null for any error condition. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> %STRING = $Web_Hdr_Parm( fieldname, occurrence, | <p class="syntax"><section begin="syntax" /> %STRING = $Web_Hdr_Parm( fieldname, occurrence, start, length ) | ||
<section end="syntax" /></p> | <section end="syntax" /></p> | ||
===Syntax terms=== | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>fieldname</th> | <tr><th>fieldname</th> | ||
Line 24: | Line 24: | ||
==Examples== | |||
The following example places the value of each header parameter into a User Language %variable of the same name. | The following example places the value of each header parameter into a User Language %variable of the same name. | ||
<p class="code"> | <p class="code">* Stash the header values in matching fields. | ||
%METHOD = $Web_Hdr_Parm( 'METHOD' ) | |||
%URL = $Web_Hdr_Parm( 'URL' ) | |||
%VERSION = $Web_Hdr_Parm( 'VERSION' ) | |||
</p> | </p> | ||
See also | ==See also== | ||
<ul> | <ul> | ||
<li><var>[[$Web_Hdr_Len]]</var> | <li><var>[[$Web_Hdr_Len]]</var> | ||
<li><var>[[$Web_Hdr_Name]]</var> | <li><var>[[$Web_Hdr_Name]]</var> |
Revision as of 21:38, 12 June 2012
<section begin="desc" />Value of request header field<section end="desc" />
$Web_Hdr_Parm retrieves the value of a request header field.
$Web_Hdr_Parm takes four arguments and returns a string, or null for any error condition.
Syntax
<section begin="syntax" /> %STRING = $Web_Hdr_Parm( fieldname, occurrence, start, length ) <section end="syntax" />
Syntax terms
fieldname | The name of the header field, returned by $Web_Hdr_Name. Required argument if occurrence not specified, otherwise optional. |
---|---|
occurrence | The occurrence number of a header field, or the occurrence number of the header field matching fieldname, if fieldname is specified. Optional argument if fieldname is specified, otherwise it is required. |
start | Starting position within the field. Optional argument which defaults to 1. |
length | Length to return. This is an optional argument which defaults to the length of the header field. The length of a header field can be determined with $Web_Hdr_Len. |
Examples
The following example places the value of each header parameter into a User Language %variable of the same name.
* Stash the header values in matching fields. %METHOD = $Web_Hdr_Parm( 'METHOD' ) %URL = $Web_Hdr_Parm( 'URL' ) %VERSION = $Web_Hdr_Parm( 'VERSION' )