Code generation
Postman is able to generate the relevant code to make requests in a variety of languages.
In this example, we will generate the appropriate authentication request for curl.
Re-run the authentication request from the collection:
Then click on the 'Code' icon in the right sidebar:
This pops up the Code snippet sidebar. curl should be selected by default; if not, then use the dropdown menu to select curl:
Now we can see the set of curl commands that matches this Postman request:
Let's authenticate again, by running the generated curl commands in a terminal:
As you can see, we can make an equivalent request in curl.
This is valuable for bash scripts, where we can store the values of the tokens in variables. However, Postman does this automatically, which makes it a convenient tool with which to investigate APIs.