new HttpConnection()
A single connection to a HTTP server.
Extends
Methods
asyncRequest(request)
Sends the requests in an asynchronous manner. Neither waits for sending the request nor for receiving the response. Check the log file for errors (channel "javascript").
Name | Type | Description |
---|---|---|
request | $k.HttpRequest |
- Since
- 5.2.2
If the URI is not allowed
- Type
- URIError
authenticate(username, password)
Set the username and password
Name | Type | Description |
---|---|---|
username | string | |
password | string |
- Since
- 4.0.3
- Inherited From
authenticateFromEncrypedAccount(encryptedAccount)
Set the username and password from a volume encrypted authenication string
Name | Type | Description |
---|---|---|
encryptedAccount | string | Encrypted account (Base64 encoded string generated in the Admin-Tool) |
- Since
- 5.2.1
- Inherited From
getResponse(request) → {$k.HttpResponse}
Sends the requests and returns a reponse
Name | Type | Description |
---|---|---|
request | $k.HttpRequest |
- Deprecated
- Use
request()
- Use
If no response was received (timeout etc.)
If the URI is not allowed
- Type
- URIError
The response for the request
- Type:
- $k.HttpResponse
proxyUseNegotiate()
Use negotiate mechanism for authentication with the proxy
- Since
- 5.3.2
request(request) → {$k.HttpResponse}
Sends the requests and returns a reponse
Only HTTP(S) requests are allowed. If the URI uses another protocol (e.g. 'file'), then an URIError is raised.
It is possible to restrict the domains that can be accessed by adding the following to the configuration file of a client (bridge etc.):
[script]
allowedOutgoingDomains=*.intelligent-views.com,ivinternal:8080
Name | Type | Description |
---|---|---|
request | $k.HttpRequest |
- Since
- 5.3
If no response was received (timeout etc.)
If the URI is not allowed
- Type
- URIError
The response for the request
- Type:
- $k.HttpResponse
setProxy(hostopt, portopt, typeopt, credentialsopt)
Set the proxy data to use for this connection: host, port, type, credentials
Name | Type | Attributes | Description |
---|---|---|---|
host | string | <optional> | name of the proxy host, if omitted deactivates proxy |
port | number | <optional> | port of the proxy, default 3128 |
type | string | <optional> | type of the proxy http/https, default "http" |
credentials | string | <optional> | encrypted account (base64 encoded string generated in the Admin-Tool) |
- Since
- 5.3.2
An argument has an invalid value
setTimeout(timeout)
Set the timeout in milliseconds for connection to wait for reponses
Name | Type | Description |
---|---|---|
timeout | number | number of milliseconds to wait for reponses, default 20000 |
- Since
- 4.2.0
- Inherited From
useNegotiate()
Use negotiate mechanism for authentication
- Since
- 5.2.2