Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added postman tutorial #35

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more of a personal preference, but it would cleaner to have a simple red rectangle's outline over the button rather than a hand-drawn circle.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
abhutta0 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions tutorials/week1-installing-postman.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Tutorial: How to Install and Use Postman
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
abhutta0 marked this conversation as resolved.
Show resolved Hide resolved

VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
## Introduction to Postman

Postman is a popular API testing tool that allows developers to build, test, and modify APIs quickly and easily. It provides a interface to interact with APIs and simplifies API development. Postman supports making requests like GET, POST, PUT, DELETE, and more.
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
abhutta0 marked this conversation as resolved.
Show resolved Hide resolved

With Postman, you can:
- **Send requests to APIs** to retrieve or submit data.
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
- **Test API responses** to ensure that they return the expected results.
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved

## Steps to Install Postman
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved

### Step 1: Download Postman
1. Open your web browser and navigate to the official Postman website: [https://www.postman.com/downloads/](https://www.postman.com/downloads/).
2. Select the version that is compatible with your operating system (Windows/macOS).
3. Click the "Download" button.

### Step 2: Install Postman

#### For Windows:
1. Once the download is complete, find the setup file in your downloads folder (typically named `Postman-win64-setup.exe`).
2. Double-click the file to start the installation.
3. Follow the on-screen instructions to complete the installation. Postman will install automatically and open once the process is finished.

#### For macOS:
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
1. Open the downloaded `.dmg` file.
2. Drag the Postman app icon into the "Applications" folder.
3. Once copied, go to your Applications folder and double-click the Postman icon to launch the app.

### Step 3: Create an Account (Optional but Recommended)
Once Postman is installed:
1. Open the Postman application.
2. You will be prompted to sign in or create a Postman account.

## Using Postman: Basic Steps

### Step 1: Launch Postman
After installation, launch Postman. You’ll see a workspace where you can start creating requests.

### Step 2: Make Your First API Request
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
1. Click on the “New” button at the top-left and select **HTTP**.

![Postman1](./assets/week1-installing-postman/Postman1.png)

2. In the request window, choose the type of request method (GET, POST, PUT, DELETE) from the dropdown menu (default is GET).
3. Enter the URL of the API you want to test in the input field (e.g., `https://localhost:8000/api/users`).
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
abhutta0 marked this conversation as resolved.
Show resolved Hide resolved

![Postman2](./assets/week1-installing-postman/Postman2.png)

4. To send a POST request you need to include the Body as well.
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
- Go to the **Body** tab.
- Select **raw**.
- Choose **JSON** as the format.
- Enter the JSON data in this format:
```json
{
"username": "testuser",
"email": "[email protected]"
}
```
![Postman3](./assets/week1-installing-postman/Postman3.png)

5. Click the **Send** button (make sure your backend is running).
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved

### Step 3: View the Response
- After clicking "Send," Postman will display the API response below the request window.
- You will see the **Status Code**, **Response Body**, **Headers**, and **Cookies** (if applicable).
VatsalMehta27 marked this conversation as resolved.
Show resolved Hide resolved
abhutta0 marked this conversation as resolved.
Show resolved Hide resolved