5 ms·
Well, you expect http library to be as good as everywhere else.. like python requests. When library is not updated due to app compatibility issues i would not c
by Dolores12 7y ago
Well, you expect http library to be as good as everywhere else.. like python requests. When library is not updated due to app compatibility issues i would not call it modern. It is good enough for basic use, tho.
- manigandham 7y agoHttpClient supports http2, the latest protocol features, has been rewritten in managed code with sockets, and includes advanced handling to balance connection lifetimes with DNS updates. It's about as modern as it gets and we run 10 billion requests per day through this code without issue. How does a lack of support for an RFC (which is still being revised) that outlines where a cookie should not be accepted in edge cases mean the HTTP library is not modern? Where are you running into this issue in a real app?
- Dolores12 7y ago> Where are you running into this issue in a real app? I had discovered few bugs in cookies handling myself, compared behavior to competitors and moved on. If cookies handling is not enough, i came across inconsistent behavior on different platforms: on Windows it uses WinHttpHandler, on Linux its curl lib(if i remember correctly). And they both handle edge cases differently.
- manigandham 7y agoHttpClient uses sockets in managed code since .NET Core 2.1 which was released in Oct 2018: https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-2-1#sockets-improvements https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotne... There shouldn't be any platform issues unless you're using an even older version or manually forcing it. What bugs in cookie handling did you encounter? This is very widely used code and the team is responsive so if you can document the issues then they can help.
- Rapzid 7y agoYeah, comparing it to requests which is: A.) Not even stdlib and B.) Doesn't support async/await Is an odd choice.
- daniel-levin 7y agoWell, requests is a third party library. I don't like Python's standard library's HTTP APIs. I think that's a common sentiment. Similarly, you can get a solid third party its client for dotnet [1]. .NET core certainly has its shortcomings. I'm going to rattle of a list of other high quality libraries that address the .NET core shortcomings for me personally: 1) Dapper - https://github.com/StackExchange/Dapper https://github.com/StackExchange/Dapper 2) DbUp - https://dbup.readthedocs.io/en/latest/ https://dbup.readthedocs.io/en/latest/ 3) Autofac - https://autofac.org/ https://autofac.org/ The Kestrel source code expanded my view of what was possible in C# with respect to low level operations on memory (check out the fixed statement [2]). A part of me doesn't want to like Microsoft because of their anti-competitive behavior in the past and crappy developer experiences from 10 years ago. Now, I sound like a Microsoft shill because of how good .NET core is. [1] https://github.com/restsharp/RestSharp https://github.com/restsharp/RestSharp [2] https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/fixed-statement https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...