Sep
8
Setup Postman for local API testing

1. Start Your API Locally

Make sure your API is running. For example:

  • ASP.NET Core: https://localhost:5001 or http://localhost:5000
  • Docker: Check exposed ports and container IP
  • /ul>

    2. Create a New Postman Collection

    • Open Postman
    • Click Collections > New Collection
    • Name it something like Local API Testing
    • /ul>

      3. Add Environment Variables (Optional but Recommended)

      • Go to Environments > Add
      • Add variables like:
        • baseUrl = https://localhost:5001
        • authToken = (if needed for authorization)
        • /ul> /li>
        • Save and select this environment in the top-right dropdown
        • /ul>

          4. Create Requests

          • Click New > Request
          • Set method (GET, POST, etc.)
          • Use {{baseUrl}}/api/your-endpoint in the URL
          • Add headers (e.g., Authorization: Bearer {{authToken}})
          • Add body (for POST/PUT) in JSON format
          • /ul>

            5. Handle SSL Issues

            If you're using https://localhost, Postman might warn about self-signed certificates:

            • Go to Settings > General
            • Turn SSL certificate verification to OFF
            • /ul>

              6. Test and Debug

              • Send requests and inspect responses
              • Use Postman Console (View > Show Postman Console) for debugging
              • /ul>


An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.