This tutorial aims to generate an access token, add access tokens to a Postman request, and demonstrate how to execute it.
https://restful-booker.herokuapp.com/auth
{ "username": "admin", "password": "password123" }
Click on the Body
Check the raw option
Select the JSON
Add a Request body
This is done to ensure that we send the request in the correct format that the server expects. The request body example mentioned at the beginning of the tutorial should be copied and pasted into the Postman request body.
Format Type
Each request has a defined response to it as defined by the Content-Type header. That response can be in any format. Such as in the above example, we have a JSON code file.
Below are the various format types present in Postman.
JSON
Congratulations on finishing this tutorial and I hope you found it helpful! Happy learning!
You can now copy this token value and use it for another request.