Timeout (HttpRequest property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
{{Template:HTTPRequest:Timeout subtitle}}
[[Category:HTTPRequest methods|Timeout property]]


This method lets
This method lets
Line 21: Line 20:
If no <var>Timeout</var> property value is set, the port <var>TIMEOUT</var> setting (if any) is used.
If no <var>Timeout</var> property value is set, the port <var>TIMEOUT</var> setting (if any) is used.
==Syntax==
==Syntax==
<p class="syntax">%httpreq:Timeout = value
{{Template:HTTPRequest:Timeout syntax}}
 
%curr = %httpreq:Timeout
</p>
 
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
Line 48: Line 43:
<var>Get</var>, <var>Post</var>, or <var>Send</var> call.
<var>Get</var>, <var>Post</var>, or <var>Send</var> call.
</ul>
</ul>
==See also==
{{Template:HTTPRequest:Timeout footer}}

Revision as of 18:29, 15 June 2011

Template:HTTPRequest:Timeout subtitle

This method lets you set and query a timeout value for a Get, Post, or Send method invocation. The timeout (in wall-clock seconds) is the sum of the elaped time of all network transfers for a Get, Post, or Send, including connecting, sending the HTTP request, and fetching all the data (independent of how many TCP/IP get operations or HTTP chunks are required to obtain the response).

The Timeout value is also the timeout for each of the inidvidual Get, Post, or Send network operations. That is, for each TCP/IP read or write operation (as well as for the sum of these operations), the Timeout property value overrides any Janus port definition TIMEOUT setting for the socket. If no Timeout property value is set, the port TIMEOUT setting (if any) is used.

Syntax

Template:HTTPRequest:Timeout syntax

Syntax terms

%httpreq An instantiated HTTPRequest object.
value A numeric expression that evaluates to an integer from 0 through 32767, which indicates the maximum number of wall-clock seconds that a Get, Post, or Send method invocation may take. If an invalid or out of range value is specified, the request is canceled. A value of 0 (the default) means no timeout is enforced.
%curr The numeric variable for the assignment of the current value of Timeout.

Usage notes

  • Typically, you set Timeout to the maximum wait you want your end users to experience.
  • If a Get, Post, or Send function times out, the function response is set to null, $STATUSD is set to 101, and whether the request is cancelled depends on the value of the Cancel parameter on the Get, Post, or Send call.

See also

Template:HTTPRequest:Timeout footer