Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# HttpClient POST or PUT Json with content type application/json
- C# get results from Task.WhenAll
- C# Get expiry timestamp from JWT token
- Run tasks in parallel using .NET Core, C# and async coding
- Handling "415 Unsupported Media Type" in .NET Core API
- ASP.Net Core API - "'s' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
- Using C# HttpClient from Sync and Async code
Archive
Meta
Tag Archives: HttpClientHandler
HttpClient follow 302 redirects with .NET Core
The HttpClient in .NET Core will not automatically follow a 302 (or 301) redirect. You need to specify that you allow this. use the HttpClientHandler to do this: Now your code will follow up to 2 redirections. Please note that … Continue reading
Posted in .net, .NET Core, c#, General .NET
Tagged 301, 302, HttpClient, HttpClientHandler, Response.Redirect
Leave a comment