Proxy (HttpRequest property): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (→See also) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:HttpRequest:Proxy subtitle}} | {{Template:HttpRequest:Proxy subtitle}} | ||
The <var>Proxy</var> settable method permits the use of proxy servers with the <var>HttpRequest</var> object. | |||
If you specify a proxy server by setting <var>Proxy</var>, subsequent <var>[[Get_(HttpRequest_function)|Get]]</var>, <var>[[Post_(HttpRequest_function)|Post]]</var>, and <var>[[Send_(HttpRequest_function)|Send]]</var> calls use this proxy server. If referenced by an <var>HttpRequest</var> object, <var>Proxy</var> returns the current proxy server (or a zero length string, if no proxy was set). | |||
<var> | |||
==Syntax== | ==Syntax== | ||
{{Template:HttpRequest:Proxy syntax}} | {{Template:HttpRequest:Proxy syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%currentString</th> | ||
<td> | <td>The string or <var>[[Longstrings|Longstring]]</var> variable for the assignment of the current value of <var>Proxy</var>. If no <var>Proxy</var> value has been set, <var class="term">currentString</var> is assigned a zero-length string.</td></tr> | ||
</td></tr> | <tr><th>httpRequest</th> | ||
<tr><th><var> | <td>A previously defined and instantiated <var>HttpRequest</var> object.</td></tr> | ||
<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> | <tr><th>newString</th> | ||
</td></tr> | <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> | |||
</table> | |||
==Usage notes== | ==Usage notes== | ||
<ul> | |||
<li>If <var>Proxy</var> is set multiple times, the most recent setting is used as the proxy server. | |||
</ul> | |||
==See also== | ==See also== | ||
<ul> | |||
<li>The current proxy setting can be cleared with <var>[[RemoveProxy_(HttpRequest_subroutine)|RemoveProxy]]</var>. | |||
</ul> | |||
{{Template:HttpRequest:Proxy footer}} | {{Template:HttpRequest:Proxy footer}} |
Latest revision as of 04:29, 19 June 2011
Permit use of proxy server? (HttpRequest class)
The Proxy 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
%currentString = httpRequest:Proxy httpRequest:Proxy = newString
Syntax terms
%currentString | The string or Longstring variable for the assignment of the current value of Proxy. If no Proxy value has been set, currentString is assigned a zero-length string. |
---|---|
httpRequest | A previously defined and instantiated HttpRequest object. |
newString | Identifies the proxy server to use, and is of form:
[Protocol://]Host[:Port]
|
Usage notes
- If Proxy is set multiple times, the most recent setting is used as the proxy server.
See also
- The current proxy setting can be cleared with RemoveProxy.