-
Notifications
You must be signed in to change notification settings - Fork 11
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
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.