...
Note | ||
---|---|---|
| ||
In all parameter descriptions below, "HTTP" may refer to both HTTP and HTTPS, and both HTTP/1 and HTTP/2. |
httpGet
This function uses the GET method to retrieve content from an HTTP server.
...
Parameter | Description | |||||||
---|---|---|---|---|---|---|---|---|
| The name or IP address of the HTTP server. | |||||||
path | The path.
| |||||||
protocol | The protocol used: HTTP/1 or HTTP/2. The default value is HTTP/1. | |||||||
port | The port number to contact the HTTP server on. Port 80 is used for HTTP connection and 443 is used for HTTPS connection by default. | |||||||
secure | Indicates whether the data should be sent in secure mode or not. | |||||||
| The number of milliseconds to wait for a response. If the value is not specifically specified, the default timeout is used. The default value is 15000 milliseconds. | |||||||
| The number of milliseconds to wait for a connection to be established. If the value is not specifically specified, the default timeout is used. The default value is 3000 milliseconds. | |||||||
| A username for an account on the HTTP server. | |||||||
| Password associated with the username. | |||||||
headers | Custom HTTP request headers. | |||||||
Returns | Content from the HTTP server. It will be |
httpPost
This function uses the POST method to send content to an HTTP/2 server and receives the response.
...
Parameter | Description | |||||||
---|---|---|---|---|---|---|---|---|
| The name or IP address of the HTTP server. | |||||||
| The path
| |||||||
| The body of the request in bytearray format. | |||||||
| The MIME type of the content.
| |||||||
| The protocol used: HTTP/1 or HTTP/2. The default value is HTTP/1. | |||||||
| The port number to contact the HTTP server on. Port 80 is used for HTTP connection and 443 is used for HTTPS connection by default. | |||||||
secure | Indicates whether the data should be sent in secure mode or not. | |||||||
| The number of milliseconds to wait for a response. If the value is not specifically specified, the default timeout is used. The default value is 15000 milliseconds. | |||||||
| The number of milliseconds to wait for a connection to be established. If the value is not specifically specified, the default timeout is used. The default value is 3000 milliseconds. | |||||||
| A username for an account on the HTTP server. | |||||||
| Password associated with the username. | |||||||
headers | Custom HTTP request headers. | |||||||
Returns | Content from the HTTP server. It will be |
httpReq
This function makes an HTTP request and uses the specified method, e g GET, POST, PUT etc.
...
Parameter | Description | |||||||
---|---|---|---|---|---|---|---|---|
| The HTTP method. | |||||||
| The name or IP address of the HTTP server. | |||||||
| The path
| |||||||
| The body of the request in bytearray format. | |||||||
| The MIME type of the content.
| |||||||
protocol | The protocol used: HTTP/1 or HTTP/2. The default value is HTTP/1. | |||||||
| The port number to contact the HTTP server on. Port 80 is used for HTTP connection and 443 is used for HTTPS connection by default. | |||||||
secure | Indicates whether the data should be sent in secure mode or not. | |||||||
| The number of milliseconds to wait for a response. If the value is not specifically specified, the default timeout is used. The default value is 15000 milliseconds. | |||||||
connectionTimeout | The number of milliseconds to wait for a connection to be established. If the value is not specifically specified, the default timeout is used. The default value is 3000 milliseconds. | |||||||
| A username for an account on the HTTP server. | |||||||
| Password associated with the username. | |||||||
headers | Custom HTTP request headers. | |||||||
Returns | A response from the HTTP server. It will be |
httpMultipartPost
This function uses the POST method to send multipart binary contents to an HTTP server and receives the response.
...
Note | |||||||
---|---|---|---|---|---|---|---|
| |||||||
For optional parameters, you need to state null in case you specify subsequent optional parameters. If there are no subsequent parameters, you do not have to state anything.
|
TLS/SSL Encryption
When selecting secure, a keystore is required. In this case, the use of a truststore is supported.
Anchor | ||||
---|---|---|---|---|
|
Keystore is used to store HTTP Client’s credential. This certificate is sent to a server for authentication if required.
...
See the JVM product documentation for more information about how to use the keytool.
Configure Java Truststore for Secure URL Functions
A truststore is a keystore that is used when deciding what to trust - truststore stores certificates from third parties. If you receive data from an entity that you already trust, and if you can verify that the entity is what it claims to be, you can assume that the data does in fact come from that entity.
...