Set File Type
Table of Contents
Description
The setFileType task is used to set the specified file type to a file object. The file will be treated as the specified type while sending an HTTP request using the invoke URL task.
Syntax
<file_variable>.setFileType(<type>);
where:
Params | Data type | Description |
<file_variable> | FILE | The file for which the file type needs to be specified. Note: Only the files fetched using the invoke URL task can be used. |
<type> | TEXT | The file type that needs to be set to the file object. Allowed values: Any valid file type |
Example
The following example sets the Type - pdf to the file fetched from the web:
response = invokeUrl [ url: "http://www.africau.edu/images/default/sample.pdf" type: GET ]; response.setFileType("pdf");
where:
response
"pdf"