Panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
ON THIS PAGE
|
...
ifMessagePort
...
...
ifGetMessagePort
...
When using SetUrl to retrieve content from local storage, you do not need to specify the full file path: SetUrl("file:/example.html")
. If the content is located somewhere other than the current storage device, you can specify it within the string itself. For example, you can use the following syntax to retrieve content from a storage device inserted into the USB port when the current device is an SD card: SetUrl("file:///USB1:/example.html")
.
AddHeader(name As String, value As String) As Boolean
Adds the specified HTTP header. This is only valid for HTTP URLs. This function returns False on failure. Use GetFailureReason()
to learn the reason for the failure.
GetToString() As String
...
...
...
...
...
...
...
...
...
Note |
---|
The size of the returned string is limited to 65,536 characters. |
GetToFile(filename As String) As Integer
Connects to the remote service as specified in the URL and writes the response body to the specified file. This function does not return until the exchange is complete and may block for a long time. The response code from the server is returned. It is not possible to access any of the response headers. If you need this information, use AsyncGetToFile()
instead.
AsyncGetToString() As Boolean
...
...
...
...
Causes the transfer to be terminated if the rate drops below bytes_per_second
when averaged over period_in_seconds
. Note that if the transfer is over the Internet, you may not want to set period_in_seconds
to a small number in case network problems cause temporary drops in performance. For large file transfers and a small bytes_per_second
limit, averaging fifteen minutes or more might be appropriate.
GetFailureReason() As String
May provide additional information if any of the roUrlTransfer methods indicate failure.
SetHeaders(a As Object) As Boolean
AsyncGetToObject(type As String) As Boolean
Begins an asynchronious GET request and uses the contents to create an object of the specified type. Events will be sent to the message port associated with the object. If this method returns False, the request could not be issued and no events will be delievered.
AsyncCancel() As Boolean
EnableUnsafeAuthentication(enable As Boolean) As Boolean
...
EnableUnsafeProxyAuthentication(enable As Boolean) As Boolean
...
EnablePeerVerification(a As Boolean) As Boolean
EnableHostVerification(a As Boolean) As Boolean
...
...
...
...
...
...
...
...
...
...
...
...
Name | Type | Description |
method | String | An HTTP method. Normal values include "HEAD", "GET", "POST", "PUT", and "DELETE". Other values are supported; however, depending on server behavior, they may not work as expected. |
request_body_string | String | A string containing the request body. |
request_body_file | String | The name of a file that contains the request body |
response_body_string | Boolean | If specified and set to True, the response will be stored in a string and provided via the roUrlEvent.GetString() method. |
response_body_file | String | The name of the file that will contain the response body. The body is written to a temporary file and then renamed to the specified filename if successful. |
response_body_resume_file | String | The name of the file that will contain the response body. For a GET request, a RANGE header is sent based on the current size of the file, which is written in place rather than using a temporary file. |
response_body_object | String | Uses the response body to create an object of the specified type. See the entry for AsyncGetToObject() for supported object types. |
response_pipe | roArray | Use a pipeline of handlers to process the response body as it is received. See below for more details. |
Name | Type | Description |
hash | String | Calculate a hash (digest) of the data using the specified algorithm as it passes through the pipeline. Supported hashes include the following: "CRC32", "MD5", "SHA1", "SHA256", "SHA384", "SHA512". The resulting hash can be retrieved as a hexadecimal string using the roUrlEvent.GetHash() method. |
decompress | String | Decompress the response body using the specified algorithm. Currently, the only supported algorithm is “gzip”. It is often easier to use an HTTP Content-Encoding rather than explicitly decompressing the body. |
prefix_capture | Integer | Capture the specified number of bytes (between 1 and 16384) from the start of the stream and store them separately. The bytes can be retrieved using the roUrlEvent.GetPrefix() method, but they cannot be passed on to subsequent filters. |
output file | String | Output the pipeline to the specified file. The output is written to a temporary file and then renamed to the specified filename if successful. |
output_string | Boolean | If specified and set to True, the response will be stored in a string and provided via the roUrlEvent.GetString() method. |
...