|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > HTP. - Command > !HTP-General - General HTTP operations and utilities > !Configuration - Commands for setting up HTTP environment (timeouts, headers, proxy) > HTP. - HTTP Operations |
SPR Script Language
HTP.SetResTO
Sets the DNS resolve timeout for HTTP operations in milliseconds.
Intention
The HTP.SetResTO command in SPR configures the timeout for DNS resolution in HTTP operations, such as those performed by HTP.Request or HTP.ReqShort. You specify the timeout in milliseconds ($$MS), or omit it to reset to the default resolve timeout. This controls how long your script waits for domain name resolution before timing out.
It’s your robot’s DNS patience setter—HTP.SetResTO decides how long it waits to figure out where the server lives.
Illustration
⏱️ Set Resolve Timeout: HTP.SetResTO|3000 sets a 3-second DNS resolve timeout.
🔄 Reset: HTP.SetResTO restores the default resolve timeout.
Syntax
HTP.SetResTO|$$MS
Parameter Explanation
P1 - $$MS - (Variable, Numeric, Optional)
The DNS resolve timeout in milliseconds (e.g., $$MS as "3000"). If omitted, resets to the default stored in g_resolve.
Examples
'***********************************
' HTP.SetResTO - Sample 1: Set 3-Second Resolve Timeout
'***********************************
HTP.SetResTO|3000
MBX.Resolve timeout set to 3 seconds
HTP.Request|GET|https://example.com|||0|0|0|$$RES
MBX.Ready
'
'***********************************
' HTP.SetResTO - Sample 2: Reset to Default
'***********************************
HTP.SetResTO
PRT.Resolve timeout reset to default
MBX.Ready
'
Remarks
- Sets the DNS resolve timeout for subsequent HTTP operations.
- Omitting $$MS resets to the default stored in g_resolve.
- Affects the DNS resolution phase of HTTP requests.
Limitations
- No success confirmation; assumes HTP_SetResolveTimeout succeeds.
- Default value depends on initial g_resolve setting.
See also: