HttpRequestOptions
Advanced HTTP request options.
Props
connectionTimeout
connectionTimeout: number
| undefined
Optional. Timeout for the TCP connection to the address in seconds. The default value is 6. The value can be only decreased.
enableSystemLog
enableSystemLog: false
| undefined
| true
Optional. Whether to enable logging the POST request body. The default value is false.
headers
headers: {[key: string]: string}
| undefined
Optional. Request headers: {'Content-Type': 'text/html; charset=utf-8', 'User-Agent': 'YourCustomUserAgent/1.0'}. Note that the default value for the 'User-Agent' header is VoxEngine/1.0.
method
method: string
| undefined
HTTP request type as a string: GET, POST etc. The default value is GET.
params
params: {[key: string]: string}
| undefined
Optional. Request parameters. They can be specified in the URL itself as well.
postData
postData: string
| number[]
Optional. Raw UTF-8 encoded data string or an array of bytes in any encoding generated by str2bytes to send as the HTTP request body when 'method' is set to POST, PUT, or PATCH.
rawOutput
rawOutput: false
| undefined
| true
Optional. Whether HttpRequestResult.data should contain a list of 1-byte numbers corresponding to the HTTP response data. If set to false, HttpRequestResult.data is undefined.
timeout
timeout: number
| undefined
Optional. Timeout for getting a response to the request in seconds. The default value is 90. The value can be only decreased.