New (HttpRequest constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax table to syntax template;)
mNo edit summary
Line 1: Line 1:
{{Template:HttpRequest:New subtitle}}
{{Template:HttpRequest:New subtitle}}
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 [[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 <var>HttpRequest</var> object defaults, see the [[List_of_HttpRequest_methods|individual method descriptions]].


==Syntax==
==Syntax==
Line 6: Line 6:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>httpRequest</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.</td></tr>
<tr><th><var>%(HttpRequest)</var></th>
<td>The class name in parentheses denotes a shared method. <var>New</var> can also be invoked via an <var>[[HttpRequest_class|HttpRequest]]</var> object variable, which may be <var>Null</var>.</td></tr>
</table>
</table>



Revision as of 20:32, 21 June 2011

Create a new HttpRequest object (HttpRequest class)

The HttpRequest constructor (run automatically when New is issued) 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 class name in parentheses denotes a shared method. New can also be invoked via an HttpRequest object variable, which may be Null.

Usage notes

  • New can be called with no object, with an explicit class name, or with an object variable, even if that object is null:

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

See also