The Send HTTP request Task, when applied, will send a REST request to a web service.
This task essentially:
|Request Body (optional)||The HTTP request body.
Request Body cannot be set with a GET or HEAD request; therefore anything entered in this field when these Verbs are set will be omitted from the request.
|Request Headers (optional)||A pipe delimited list of headers to be sent with the request.
|Request URL||The URL where the web request should be sent.
|Request Verb||The resource action to perform.
The task will accept any valid request verb; the most common being:
|Response Body Constant Name (optional)||The name of the constant to drive the response body to.
When provided with the name of a constant, the task will drive the body of the response received from the REST service to it. This will enable users to process the response to retrieve requested data.
|Response Header Constant Name (optional)||The name of the constant to drive the response headers to.
When provided with the name of a constant, the task will drive the headers of the response received from the REST service to it. This will enable users to process the response to retrieve requested data.
|Title||Changes the Title (not the name) of the task.|
The following functions exist to help with the creation and processing of the HTTP Request.
When this task is added the properties are static by default.
See How To: Change A Static Property To A Dynamic Property to enable rules to be built on these properties.
|Property Name||Example Rule||Example Result||Meaning|
|Request Body||DWVariableOAuthReqBody||DWVariableOAuthReqBody||The HTTP request body.|
|Request Header||DWVariableOAuthReqHeader||DWVariableOAuthReqHeader||Headers being sent with the request.|
|Request URL||http://www.driveworks.co.uk/||http://www.driveworks.co.uk/||The website you are requesting data from.|
|Request Verb||Post||Post||Used to send Data to an external source.|
|Request Verb||Get||Get||Used to Retrieve Data from an external source.|
|Request Verb||Put||Put||Used to Update Data.|
|Request Verb||Delete||Delete||Used to Delete Data.|
|Response Body Constant Name||DWConstantResponseBody||DWConstantResponseBody||The name of the constant to drive the response body to.|
|Response Header constant Name||DWConstantResponseHeader||DWConstantResponseHeader||The name of the constant to drive the response header to.|
DriveWorks Tech Tips Portal
Send HTTP Request
Look at how to request data from a web service using the HTTP Request task in DriveWorks. You can also look at how to retrieve data from the result using Xpath.