Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

RESTful Request

Tip
  • Web Services Request can be parameterized. Refer to this documentation.
  • Learn more about Verification Snippets.
  1. Select File > New > Web Service Request from the main menu. The New Web Service Request dialog will be displayed where you can input your RESTful URL directly on this dialog.
    Image Modified

  2. After you've created a request successfully, there will be a
small
  1. small icon
next
  1.  next to the object on Tests Explorer to indicate its used method (GET, POST, PUT, DELETE)
    Image Modified
2.
  1. In the opened editor of the new service request object, there will be two separate sections for
the
  1. the Request (left pane window)
and
  1. and Response (right pane window)
Image Removed

 

 

Tip

Web Services Request can be parameterized. Refer to this documentation.

 

We will take a look at the Request section using the sample REST URL

Code Block
https://sample-web-service-aut.herokuapp.com/api/users/accept-json?gender=MALE&age=15
 

Image Added

 

Image Removed


where:

Field
Description
Request methodThe request method indicates the expected action to be executed on the specified resource. Katalon Studio supports following methods for REST services: GET, POST, PUT, DELETE.
Request URLThe URL registered for the RESTful web services.
ParametersAny 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.

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. '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.

HTTP Body

The body information to be included to transmit in the RESTful request object. Katalon Studio supports the following transmit types:

  • Text
  • x-www-form-urlencoded
  • form-data
  • file

And the following format types:

  • Text
  • JSON
  • XML
  • HTML
  • Javascript
Image Removed

Image Added

RESTful Response

Since version 5.4, Katalon Studio provides Web Services Response in a separate window pane, which contains more details information of the Request as shown below

Body

Image RemovedImage Added

 

There are 3 new information provided in the response's section:

FieldDescription

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

 DescriptionExample
prettyResponse is displayed in a pretty format which is easier to read

Image Modified

rawResponse is displayed in the raw text without any format
Image Removed

Image Added

preview

Response will be displayed as visualized

(e.g. If a Response is from loading a specific webpage, it will be displayed as the screenshot below)

Image Modified



At the bottom of the Body section, different types of Response format can be selected as desired

  • JSON
  • XML
  • HTML
  • JavaScript

Header

The response's header information is displayed in the Header tab

Image RemovedImage Added

 

Table of Contents
classkat_toc