HTTP
The HTTP namespace provides helpers for creating HTTP requests and handling their response state.
Interfaces
HTTPRequestInfo
The HTTPRequestInfo interface describes the corresponding object shape exposed by the declarations.
headers{ [key: string]: string; } (optional) - The headers.parameters{ [key: string]: string; } (optional) - The parameters.datastring (optional) - Used in POSTsslboolean (optional) - Default: falseportnumber (optional) - Default: 80 or 443 (if ssl is true)readTimeoutnumber (optional) - Default: 30, in secondswriteTimeoutnumber (optional) - Default: 30, in seconds
Functions
Request(url: string, path: string, method: string, optInfo?: HTTPRequestInfo)HTTPConnection
Performs an HTTP request using the specified URL, path, and request options.
urlstring - The base URL of the request.pathstring - The request path.methodstring - The HTTP method to use.optInfoHTTPRequestInfo (optional) - The HTTP request options.
Returned:
- HTTPConnection - The result of the call.