You can add a Web Service request to a New or any Existing test case directly in the object details view by a click on the plus icon.
Select File > New > Web Service Request from the main menu. The New Web Service Request dialog is displayed where you can input your RESTful URL directly on this dialog.
After you've created a request successfully, there is a small icon next to the object on Tests Explorer to indicate its used method.
In the editor of the new request, there are two separate sections, including Request and Response.
Please take a look at the Request section using the sample REST URL.
Request method: The request method indicates the expected action to be executed on the specified resource. Katalon Studio supports the following methods for REST services: GET, POST, PUT, DELETE, PATCH (Available from version 5.8). You can refer to more details and specifications of each method here.
Request URL: The URL registered for the RESTful web services
Parameters: Any parameter to be passed along with the RESTful request object. These values are generated automatically based on the Request URL or can be manually added. Starting from version 7.0, Katalon Studio encodes special characters in query parameters before sending requests.
Authorization: Credentials for HTTP authentication.
Type: Basic, OAuth 1.0, or No Authorization
HTTP Headers: The header information to be included to transmit in the RESTful request object. By default, the Content-Type value is generated automatically based on the HTTP Body. You can also select headers from the list of suggested options (by double-clicking on the Name cell) or enter another header of your interest. Refer to Supported HTTP Headers for more details.
Starting from version 7.2.5, Katalon Studio supports disabling specifying the content type of HTTP Header based on HTTP Body automatically. This allows users to configure content types for HTTP Header and Body separately.
HTTP Body: The body information to be included to transmit in the RESTful request object. Katalon Studio supports the following transmit types:
And the following format types:
Since version 5.4, Katalon Studio provides Web Services Response in a separate windowpane, which contains more details information of the request as shown below.
There are 3 fields provided in the response's section:
- Status: The status code of the response
- Elapsed: The total time that starts from the request is sent until Katalon Studio receives the last byte of the response
- Size: Size of the response package
The Response can be displayed in multiple ways:
- pretty: Response is displayed in a pretty format which is easier to read
- raw: Response is displayed in the raw text without any format
- preview: Response is displayed as visualized (e.g., If a Response is from loading a specific webpage, it is displayed as the screenshot below)
At the bottom of the Body section, different types of Response format can be selected as desired:
The response's header information is displayed in the Header tab