Proxy (HttpRequest property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 15: Line 15:
<td>A previously defined and instantiated HTTPRequest object.
<td>A previously defined and instantiated HTTPRequest object.
</td></tr>
</td></tr>
<tr><th>ProxyServer</th>
<tr><th><var>ProxyServer</var></th>
<td>Identifies the proxy server to use, and is of form: <p class="code"> [Protocol://]Host[:Port] </p> <ul> <li>Protocol is <code>http</code> or <code>https</code> and defaults to <code>http</code>. It controls the protocol used for the connection to the proxy server. <li>Host specifies either the IP number or the DNS name of the proxy server. It must be specified or the request is cancelled. <li>Port specifies the port number for the proxy server. If it is not specified, the default for the protocol (http is 80, and https is 443) is used. </ul>
<td>Identifies the proxy server to use, and is of form: <p class="code"> [Protocol://]Host[:Port] </p> <ul> <li>Protocol is <code>http</code> or <code>https</code> and defaults to <code>http</code>. It controls the protocol used for the connection to the proxy server. <li>Host specifies either the IP number or the DNS name of the proxy server. It must be specified or the request is cancelled. <li>Port specifies the port number for the proxy server. If it is not specified, the default for the protocol (http is 80, and https is 443) is used. </ul>
</td></tr>
</td></tr>

Revision as of 21:58, 15 June 2011

Template:HTTPRequest:Proxy subtitle

This settable method permits the use of proxy servers with the HTTPRequest object.

If you specify a proxy server by setting Proxy, subsequent Get, Post, and Send calls use this proxy server. If referenced by an HTTPRequest object, Proxy returns the current proxy server (or a zero length string, if no proxy was set).

Syntax

Template:HTTPRequest:Proxy syntax

Syntax terms

%httpreq A previously defined and instantiated HTTPRequest object.
ProxyServer Identifies the proxy server to use, and is of form:

[Protocol://]Host[:Port]

  • Protocol is http or https and defaults to http. It controls the protocol used for the connection to the proxy server.
  • Host specifies either the IP number or the DNS name of the proxy server. It must be specified or the request is cancelled.
  • Port specifies the port number for the proxy server. If it is not specified, the default for the protocol (http is 80, and https is 443) is used.
%curr The string or longstring variable for the assignment of the current value of Proxy. If no Proxy value has been set, %curr is assigned a zero-length string.

Usage notes

If Proxy is set multiple times, the most recent setting is used as the proxy server.

See also

Template:HTTPRequest:Proxy footer