โš™๏ธ๐„๐ฌ๐ฌ๐ž๐ง๐ญ๐ข๐š๐ฅ ๐‡๐“๐“๐ ๐ฆ๐ž๐ญ๐ก๐จ๐๐ฌ-E๐ฏ๐ž๐ซ๐ฒ ๐€๐๐ˆ ๐ญ๐ž๐ฌ๐ญ๐ž๐ซ ๐ฌ๐ก๐จ๐ฎ๐ฅ๐ ๐ค๐ง๐จ๐ฐ!

1. GET

Purpose: Retrieve data from the server.

Example: GET /users/1 โ†’ Fetch details of user with ID = 1.

Test focus: Ensure correct data is returned, no modification happens.

2. POST

Purpose: Create a new resource.

Example: POST /users with body { “name”: “Alice” } โ†’ Creates a new user.

Test focus: Validate resource is created, new ID returned, proper status code (201 Created).

3. PUT

Purpose: Replace an existing resource entirely.

Example: PUT /users/1 with body { “name”: “Bob” } โ†’ Replaces user 1 with new details.

Test focus: Verify old data is replaced, not partially updated.

4. PATCH

Purpose: Partially update an existing resource.

Example: PATCH /users/1 with body { “email”: “bob@test.com” } โ†’ Updates only email for user 1.

Test focus: Confirm only specified fields are updated, others remain unchanged.

5. DELETE

Purpose: Remove a resource.

Example: DELETE /users/1 โ†’ Deletes user with ID 1.

Test focus: Ensure resource is removed, subsequent GET should return 404 Not Found.

6. HEAD

Purpose: Similar to GET, but returns only headers (no body).

Example: HEAD /users/1 โ†’ Check if user exists (without fetching full details).

Test focus: Validate metadata (status, content-length, etc.).

7. OPTIONS

Purpose: Show allowed HTTP methods for a resource (CORS checks).

Example: OPTIONS /users โ†’ Server replies: Allow: GET, POST, PUT, DELETE.

Test focus: Ensure correct methods are exposed, CORS headers are set.

8. TRACE

Purpose: Diagnostic method that echoes the received request (used for debugging).

Example: TRACE /users โ†’ Server returns request as received.

Test focus: Rarely used, but testers should check itโ€™s disabled in production (security risk).

9. CONNECT

Purpose: Establish a tunnel to the server (used in HTTPS proxies).

Example: CONNECT www.example.com:443 โ†’ Initiates TLS/SSL tunnel.

Test focus: Mostly at networking/proxy layer, ensure itโ€™s handled securely.

โœ… Why API Testers Should Know All those Methods:

-To validate correct implementation of CRUD operations.

-To test security (some methods like TRACE & CONNECT should be blocked).

-To design complete test coverage (not just GET & POST).

-To ensure REST API follows standards and behaves consistently.

***

๐Ÿ”—๐‘ณ๐’†๐’‚๐’“๐’ ๐‘ท๐’๐’”๐’•๐’Ž๐’‚๐’-๐‘จ๐‘ท๐‘ฐ ๐‘ป๐’†๐’”๐’•๐’Š๐’๐’ˆ ๐’˜๐’Š๐’•๐’‰ ๐‘น๐‘ฌ๐‘บ๐‘ป, ๐‘ฎ๐’“๐’‚๐’‘๐’‰๐‘ธ๐‘ณ, ๐‘ถ๐‘จ๐’–๐’•๐’‰ 2.0+๐‘ช๐‘ฐ ๐’Š๐’๐’•๐’†๐’ˆ๐’“๐’‚๐’•๐’Š๐’๐’ (HIGHEST RATED ๐‘ผ๐’…๐’†๐’Ž๐’š-๐‘ท๐’๐’”๐’•๐’Ž๐’‚๐’ ๐‘ช๐’๐’–๐’“๐’”๐’† ):๐Ÿ‘‰ย https://www.udemy.com/course/sariful_postman/?couponCode=AUG2025

๐Ÿ”—Master Cypress Automation-Scratch to Pro+ Frameworks & API:๐Ÿ‘‰ https://www.udemy.com/course/master-cypress-automation-sariful/?referralCode=973061C2F57C6B3BB614

๐Ÿ” Follow Sariful I. for more insights- QA & Automation, Mock Interviews & Career Growth content.

#apiTesting #postman #api #sdet #sqa

Share the Knowledge

You May Also Like

About the Author: Sariful I.