0 votes
in XML by
What are Request Parameters in Postman?

1 Answer

0 votes
by

Request parameters are used to send additional information to the server. A URL contains these parameters. There are two types of parameters:

Query Parameter: These are appended to the end of the request URL, Query parameters are appended to the end of the request URL, following '?' and listed in key-value pairs, separated by '&' Syntax:

  1. ?id=1&type=new  

Path Parameters: These are part of the request URL, which are accessed using the placeholders preceded by ':' Example:

  1. /customer/:id  

There are two ways of setting query parameters on a request in Postman.

Using URL Field

The most common way of adding parameters is- append the query string to the end of the URL.

Let's enter a URL in the URL text field:

Suppose we have the URL www.google.com/search when you click on send option you will get the following response:

Request Parameters in Postman

Now try to enter the parameter in the following format:

.google.com/search?q=madanswer

Here 'q' is the key, and 'madanswer' is the value of the key.

When you enter the parameter in the URL and select the send button then you will get the following response:

Using Params

Using Params is the second way. This option is available on the left side of the URL text field. This option will offer you additional text fields under the URL field to enter the query parameters in the form of key-value pairs.

Once you enter parameters in the Params text field, then these parameters will automatically be added to the URL. The interface offers to keep your entered parameters in an organized way, which is very useful for the requests that require several parameters.

Let's see an example:

Enter the URL www.google.com/search in the URL text field:

Request Parameters in Postman

And now go to the Params section:

Request Parameters in Postman

Write the parameters under the key-value pair, as shown. Here, k is the query, and is the search term.

Related questions

0 votes
0 votes
0 votes
asked Sep 16, 2020 in XML by GeorgeBell
0 votes
0 votes
asked Sep 16, 2020 in XML by GeorgeBell
0 votes
asked Sep 16, 2020 in XML by GeorgeBell
+1 vote
asked May 20, 2021 in POSTMAN by sharadyadav1986
...