Build New Request
Last updated
Last updated
Now you know how to Import or Create assets manually. So let's go ahead and check out how to build a new request.
As shown in the above image, you can click on the "New Request" button and start filling in all necessary information.
As shown in the above image, you'll find 4 tabs to create a request. Let's understand each tab.
The initial tab is labeled "Info & Headers," requiring various details as specified below.
Request and Response Name:
Provide the name of the Request from which you want to identify the case of the Request. for example, Positive Scenario, Negative Scenario, etc.
Status Code:
Select the status code that suits your request best. Qyrus provides a wide range of status codes as mentioned below.
1xx Informational Response
2xx Successful
3xx Redirection
4xx Client Error
5xx Server Error
Delay:
Provide the delay that you want in your virtualized request. The delay time should be in milliseconds (ms).
Headers:
Provide the request header which you want to make necessary while making the request.
Refer below image for reference.
The "Request and Response" tab is the second one, and it needs request and response data based on the chosen method.
If you pick the GET or DELETE method, you'll only need a Response Body. However, if you select the POST, PUT, or PATCH method, you'll need both Request Body and Response Body data.
Also, Provide valid data based on the selected body type either JSON, XML, or Text as shown below.
Suppose, you're making POST, PUT, or PATCH requests then you'll find the Request Body field as well as shown below.
The tab labeled "Query Params" is the third tab, and it requires query parameters in the form of pairs of keys and values.
If you want query parameters as part of your virtualized API, like /fetch-cart-detail?id=1 then you can make use of query parameters as shown below
The final tab, named "Path Params," needs key-value pairs as path parameters.
If you want path parameters as part of your request, like /fetch-cart-detail/1 then you can make use of path parameters as shown below. You have to make changes in the context path as well, you have to add the key of the path param like this /{id}
Once all pieces of information are provided, you can click on the update button and save the new request.
You can add multiple requests as well in the single asset as shown below.