Doing basic requests

First, we'll start with a simple test to get a JWT, which we'll then store so that we can use it in upcoming tests. Open the Postman application and click on New to create a request. Give it a name and a description, and either select or create a collection or folder to save it. Don't worry too much about the actual placement; you'll be able to move requests around, edit them, and more.

Then, to get a token, we need a POST, so set the method appropriately. Select the BODY tab, pick the x-www-form-urlencoded option, and add two values, user and password, which will be sent with the request. (For other situations, you might send raw data such as XML or JSON, or binary data such as a file.) Check out the following screenshot:

 Creating a POST request to get a JWT

Now, if you test it out by clicking on Send, the request will go to your server, and the answer will appear at the bottom of the screen:

 A test run of our request shows that everything is working fine
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset