Page (HttpRequest property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
mNo edit summary
Line 1: Line 1:
{{Template:HTTPRequest:Page subtitle}}
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
[[Category:HTTPRequest methods|Page property]]


This 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 <var>Page</var>,
and you fetch its value by referencing it without any parameters.
==Syntax==
==Syntax==
{{Template:HTTPRequest:Page syntax}}
<p class="syntax">%httpreq:Page = pageval
 
%curr = %httpreq:Page
</p>
 
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%string</th><td>string</td></tr>
<tr><th>%httpreq</th>
<tr><th>hTTPRequest</th>
<td>An instantiated HTTPRequest object.
<td>HTTPRequest object</td></tr>
</td></tr>
</table>
<tr><th>pageval</th>
==Usage notes==
<td>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.
==Examples==
</td></tr>
==See also==
<tr><th>%curr</th>
{{Template:HTTPRequest:Page footer}}
<td>A string or longstring variable for the assignment of the current value of Page.
 
</td></tr></table>
 
==Example==
 
As an example, the page is <code>/links.html</code> in:
<p class="code"> http://foo.com:123/links.html
</p>
 
You set this page using;
<p class="code">%httpreq:Page = '/links.html'
</p>

Revision as of 23:53, 14 June 2011

<section begin=dpl_desc/><section end=dpl_desc/>

This 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

%httpreq:Page = pageval %curr = %httpreq:Page

Syntax terms

%httpreq An instantiated HTTPRequest object.
pageval 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.
%curr A string or longstring variable for the assignment of the current value of Page.

Example

As an example, the page is /links.html in:

http://foo.com:123/links.html

You set this page using;

%httpreq:Page = '/links.html'