Send Web Request Activity
Description
The Send Web Request activity performs an HTTP web request.
Inputs
Url |
Required Type: String The URL for the request. |
Method |
Optional Type: "GET" | "POST" | String The request method. For example, GET, POST, PUT, DELETE, HEAD, OPTIONS. The default is GET. |
Headers |
Optional Type: Lookup<any> The headers for the request. |
Query |
Optional Type: Lookup<any> The query string parameters for the request. |
Form |
Optional Type: Lookup<any> The form parameters for the request. |
Blob |
Optional Type: ArrayBuffer | Blob The Binary/blob content for the request. |
Json |
Optional Type: any The JSON content for the request. |
Text |
Optional Type: String The Text content for the request. |
Expect |
Optional Type: "blob" | "json" | "text" | String The expected type of the response. For example, if json is selected, the response will be parsed as JSON and the json output argument will be assigned. |
Channel Name |
Optional Type: "default" | "arcgis" | "geocortex" | String The name of the channel used to issue the request. The channel controls aspects of how the request is issued, including how authentication and parameter serialization are handled. If unspecified, the default channel is used. When issuing a request to an ArcGIS endpoint use "arcgis". When issuing a request to a Geocortex endpoint use "geocortex". |
Timeout |
Optional Type: Number The amount of time (in milliseconds) to wait for a response from the server. The default is 60000 milliseconds (one minute). |
Cors with Credentials |
Optional Type: Boolean Whether or not to include credentials in a CORS request. This setting is only applicable to the default channel when used in a client workflow. Only set this to true for URLs you trust. The default value is false. |
Fail for non-success Status Codes |
Optional Type: Boolean True if the activity should throw an error if the request completed with a status code outside of the "success" range. (200-299) When false, the activity will complete successfully regardless of the status code of the response. It will only throw an error if did not receive a response. The default value is true. Setting this input to false only works when the default channel is used. |
Outputs
blob |
Type: ArrayBuffer The binary/blob content of the response. If the activity fails, this value can be read via the partialResult.blob property of the error that is thrown. Put the activity in the Try subworkflow of a Try/Catch activity and read the Try Catch activity's "error" output in the Catch subworkflow. |
channel |
Type: ChannelInfo The channel that was used for the request. The channel provides access to the raw request and response objects. |
elapsed |
Type: Number The elapsed time (in milliseconds) of the request. |
json |
Type: any The JSON content of the response. If the activity fails, this value can be read via the partialResult.text property of the error that is thrown. (In such cases, the response is not parsed as JSON.) Put the activity in the Try subworkflow of a Try/Catch activity and read the Try Catch activity's "error" output in the Catch subworkflow. |
status |
Type: Number
The HTTP status code of the response. If the activity fails, this value can be read via the partialResult.status property of the error that is thrown. Put the activity in the Try subworkflow of a Try/Catch activity and read the Try Catch activity's "error" output in the Catch subworkflow. |
text |
Type: String The text content of the response. If the activity fails, this value can be read via the partialResult.text property of the error that is thrown. Put the activity in the Try subworkflow of a Try/Catch activity and read the Try Catch activity's "error" output in the Catch subworkflow. |
Properties
For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.
Connectivity Requirements
This activity does not work when the device has intermittent connectivity to the network.
Version Information
Supported from: Geocortex Viewer for HTML5 2.9, ArcGIS Web AppBuilder 2.4.