📬Postman
Fall 2023 | Vin Bui
Postman is an API platform used by developers to test API calls. It is a powerful tool that we can use to build and design APIs.
Installation
You can download Postman here. Once it’s installed, create an account.
Getting Started
To get started, create a Blank Workspace. Give it a name and set the access scope to whatever you like.
Make sure the Collections tab is selected, then click the
+
button to create a new collection.To add requests to this collection, click on the triple dots (
…
) then select Add request.
Creating a Request
Click on the triple dots (
…
) next to your collection and select Add request.Give it any name you want.
Select the request type: GET, POST, etc.
Enter the endpoint URL.
(Optional) Provide a request body or input query parameters.
For the request body, select Body > Raw > JSON. Then input body parameters in JSON format.
Click send to send the request
Examples
GET Request
Let’s fetch the FA23 AppDev Roster: https://ioscourse-g3jtiqqehq-ue.a.run.app
This is a GET request that does not take in any query parameters or request body. You can also see the status of the request (”200 OK”).
POST Request
Let’s add a new member to the roster:https://ioscourse-g3jtiqqehq-ue.a.run.app
This is a POST request that takes in a request body in the above JSON format. The server responds with a 200 status code and the member that we added.
If we tried to provide an invalid request, then the server responds with a 400 Bad Request status code and an error message.
Last updated