New (HttpRequest constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:HttpRequest:New subtitle}}
{{Template:HttpRequest:New subtitle}}
<var>New</var> takes no arguments and sets the request object default values. For more information about <var>HttpRequest</var> object defaults, see the [[List_of_HttpRequest_methods|individual method descriptions]].


The <var>HttpRequest</var> constructor (run automatically when <var>New</var> is issued)
takes no arguments and sets the request object default values.
For more information about HTTP request object defaults, see the individual method
descriptions in this chapter.
==Syntax==
==Syntax==
{{Template:HttpRequest:New syntax}}
{{Template:HttpRequest:New syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%httpreq</th>
<tr><th>%httpRequest</th><td>A declared <var>HttpRequest</var> object to contain the new <var>HttpRequest</var> object instance.</td></tr>
<td>The declared <var>HttpRequest</var> object that gets instantiated by New.
<tr><th><var>[%(HttpRequest):]</var></th>
<td>The optional class name in parentheses denotes a <var>[[Notation conventions for methods#Constructors|Constructor]]</var>.  See [[#Usage notes|"Usage notes"]], below, for more information about invoking an <var>HttpRequest</var> <var>Constructor</var>.</td></tr>
</table>


</td></tr></table>
==Usage notes==
==Usage notes==
<ul>
<li>As described in [[Object variables#Using New or other Constructors|"Using New or other Constructors"]], <var>New</var> can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is <var>Null</var>:<p class="code">%httpRequest = new


<var>New</var> can be called with no object, with an explicit class
%httpRequest = %(HttpRequest):new
name, or with an object variable, even if that object is null:
<p class="code"> %httpreq = new


%httpreq = %(httprequest):new
%httpRequest = %httpRequest:new
</p>
</ul>


%httpreq = %httpreq:new
</p>
==See also==
==See also==
{{Template:HttpRequest:New footer}}
{{Template:HttpRequest:New footer}}

Latest revision as of 20:23, 30 November 2011

Create a new HttpRequest object (HttpRequest class)

New takes no arguments and sets the request object default values. For more information about HttpRequest object defaults, see the individual method descriptions.

Syntax

%httpRequest = [%(HttpRequest):]New

Syntax terms

%httpRequestA declared HttpRequest object to contain the new HttpRequest object instance.
[%(HttpRequest):] The optional class name in parentheses denotes a Constructor. See "Usage notes", below, for more information about invoking an HttpRequest Constructor.

Usage notes

  • As described in "Using New or other Constructors", New can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is Null:

    %httpRequest = new %httpRequest = %(HttpRequest):new %httpRequest = %httpRequest:new

See also