HttpClient
- How to make concurrent requests with HttpClient
- How to consume an SSE endpoint with HttpClient
- Switch from using HttpWebRequest to HttpClient
- How to unit test code that uses HttpClient
- How to use toxiproxy to verify your code can handle timeouts and unavailable endpoints
- Get and send JSON with HttpClient
- Newtonsoft extension methods for HttpClient
- How to change the HttpClient timeout per request
- How to add request headers when using HttpClient
- Sending query strings with HttpClient
- How to cancel an HttpClient request
- How to read response headers with HttpClient
- How to send a file with HttpClient
- Disposing the request HttpContent when using HttpClient
- The performance gains of HttpClient reusing connections
- Configuring how long an HttpClient connection will stay open
- Handling redirects with HttpClient
- How to read problem details JSON with HttpClient
- How to get the status code when using HttpClient
ASP.NET Core
General
- Async SSE endpoint
- Use Swagger to generate API documentation
- How to enable CORS for all endpoints
- Adding your own feature flags
- How to unit test an ApiController
- How to turn off startup logging
- Self-hosted service stub with a command line interface
- How to make the controllers use Newtonsoft
- How to change the JSON serialization settings
- How to use NLog in ASP.NET
- How to supply IOptions<T>
Errors
- The request matched multiple endpoints
- InvalidOperationException: Synchronous operations are disallowed
Requests/responses
- How to add your own middleware function
- How to add your own action filter
- Get posted form data in an API Controller
- Getting query string values
- How to return a 500 response
- How to receive a file
- Return a redirect response
- API model validation attributes
- Create a custom model validation attribute
- How to get request headers
appsettings.json and secrets.json
- How to read custom configurations from appsettings.json
- How to update appsettings.json programmatically
- How to add User Secrets
- How to programmatically update the User Secrets file
Background Services
- How to use a BackgroundService for long-running and periodic tasks
- Log messages to the database in the background
- How to stop the ASP.NET service when a background service crashes
- Dependency inject a background service into the controllers