This directory contains HTTP request files for testing all APIs in the BuildWithAspire application.
apiservice.http- Comprehensive tests for the main API servicemcpserver.http- Tests for the MCP (Model Context Protocol) serverwebfrontend.http- Tests for the web frontend endpoints
Install the REST Client extension for VS Code.
- Open any
.httpfile - Click the "Send Request" button above each request
- View the response in the new tab
Before testing, update the base URLs in each file to match your current Aspire deployment:
- Run
aspire run - Check the Aspire dashboard for current port assignments
- Update the
@baseUrlvariables in each file
Example port assignments (these change on each run):
webfrontend: https://localhost:7051
apiservice: https://localhost:7287
mcpserver: http://localhost:34055
Use apiservice.http for comprehensive API testing:
- Test weather endpoints
- Create conversations
- Send messages
- Test chat functionality
Use mcpserver.http to test the weather tools directly.
When running in development mode, visit these URLs in your browser:
- API Service:
https://localhost:7287/scalar/v1 - MCP Server:
http://localhost:34055/scalar/v1
- API Service:
https://localhost:7287/openapi/v1.json - MCP Server:
http://localhost:34055/openapi/v1.json
# List available MCP tools
GET {{apiService}}/mcp/tools
# Call weather tools via API Service
POST {{apiService}}/mcp/call/GetCurrentWeather
POST {{apiService}}/mcp/call/GetWeatherForecast
# Direct MCP protocol calls to server (JSON-RPC)
POST {{mcpServer}}/mcp
{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/call",
"params": {
"name": "GetCurrentWeather",
"arguments": {}
}
}# 1. Create conversation
POST {{apiService}}/conversations
{
"name": "Test Chat"
}
# 2. Send message (use ID from step 1)
POST {{apiService}}/conversations/{id}/messages
{
"message": "Hello!"
}
# 3. Get conversation history
GET {{apiService}}/conversations/{id}GET {{apiService}}/health
GET {{mcpServer}}/health
GET {{webFrontend}}/healthIf requests fail, check that:
- Aspire is running (
aspire run) - Ports match the Aspire dashboard
- Services are healthy (green status)
For HTTPS endpoints, you may need to:
- Accept self-signed certificates in your browser
- Use HTTP variants if available
- Check Aspire certificate configuration
Most endpoints don't require authentication in development mode. For production deployments, you may need to add authorization headers.
When adding new endpoints:
- Add them to the appropriate service file
- Include proper documentation
- Add examples with realistic data
- Update this README if needed