Web services based on REST Architecture, commonly known as REST-ful Web Services use HTTP methods to implement the concept of REST architecture. It can be used in a variety of messaging systems and can be delivered via a variety of transport protocols. Leapwork supports making the REST request using the HTTP Request building block.
Users can perform operations to Create/Read/Update/Delete data (CRUD operations) using REST API methods viz. POST/GET/PUT/DELETE requests. To perform REST API calls, the following four things are required in Leapwork.
- URL: Provide the REST endpoint as the URL.
- Headers: The Request Header contains metadata for the HTTP Request message as key-value pairs. For example, client (or browser) type, format supported by the client, format of the message body, cache settings, etc.
- Method: The HTTP methods most commonly used in a REST based architecture are as below. Choose one from these:
GET − Provides read-only access to a resource.
PUT − Used to create a new resource.
DELETE − Used to remove a resource.
POST − Used to update an existing resource or create a new resource.
- Body: In the request body, Message content or Resource representation can be specified.
Please see below an example of an HTTP Request block with various fields populated.
For any clarification, please contact our Priority Support.