Closed yuefengkai closed 7 months ago
I have encountered the same problem and haven't found a solution yet.
Hello @yuefengkai as this is in .NET 6 the right repo for this is https://github.com/dotnet/runtime .. could you please close here and open there? (I can't transfer between microsoft/ and dotnet/ repos)
Hello,
I am experiencing intermittent connectivity issues when making requests to https://api.maersk.com/ using HttpClient in .NET 6. While I can occasionally establish a connection, most attempts fail. Interestingly, when I make the same requests using Python code, the connection is consistently successful.
Here are some troubleshooting steps I have already tried:
Modifying the HTTP protocol version. Changing HTTP headers. Confirmed that I can successfully ping and curl the URL from my location in Hong Kong. Despite these efforts, the issue persists specifically with C# HttpClient. Below is the code snippet I am using:
Could you help me identify what might be causing this inconsistency?
Thank you for your assistance.