Page (HttpRequest property): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
| Line 17: | Line 17: | ||
==Example== | ==Example== | ||
To set the page <code>/links.html</code> as in: | To set the page <code>/links.html</code> as in: | ||
<p class="code"><nowiki>http://foo.com:123/links.html</nowiki> | <p class="code"><nowiki>http://foo.com:123/links.html</nowiki> | ||
| Line 25: | Line 23: | ||
<p class="code">%httpreq:Page = '/links.html' | <p class="code">%httpreq:Page = '/links.html' | ||
</p> | </p> | ||
==See also== | ==See also== | ||
{{Template:HttpRequest:Page footer}} | {{Template:HttpRequest:Page footer}} | ||
Revision as of 20:37, 21 June 2011
Relative page path (HttpRequest class)
The Page settable property identifies a page path that is relative to the site root. Such a page, or document, is what follows the host and any port number in a URL. You set the page for an HTTP request by assigning a value to Page, and you fetch its value by referencing it without any parameters.
Syntax
%currentString = httpRequest:Page httpRequest:Page = newString
Syntax terms
| %currentString | A string or Longstring variable for the assignment of the current value of Page. |
|---|---|
| httpRequest | A previously defined and instantiated HttpRequest object. |
| newString | A string expression identifying the page to fetch. It does not include a host name. If left unset, it defaults to the slash character (/), the root page for the host website. |
Example
To set the page /links.html as in:
http://foo.com:123/links.html
You would use:
%httpreq:Page = '/links.html'