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:5001orhttp://localhost:5000 - Docker: Check exposed ports and container IP /ul>
- Open Postman
- Click Collections > New Collection
- Name it something like
Local API Testing
/ul>
- Go to Environments > Add
- Add variables like:
baseUrl=https://localhost:5001authToken= (if needed for authorization)
/ul>
/li>
- Save and select this environment in the top-right dropdown /ul>
- Click New > Request
- Set method (GET, POST, etc.)
- Use
{{baseUrl}}/api/your-endpointin the URL - Add headers (e.g.,
Authorization: Bearer {{authToken}}) - Add body (for POST/PUT) in JSON format /ul>
- Go to Settings > General
- Turn SSL certificate verification to OFF /ul>
- Send requests and inspect responses
- Use Postman Console (
View > Show Postman Console) for debugging
/ul>
4. Create Requests
5. Handle SSL Issues
If you're using
https://localhost, Postman might warn about self-signed certificates:6. Test and Debug


