4 ms·
You missed the point. There are more OSes out there. If you had to relearn a brand new "full stack experience" for every OS just to ship a cross-platform app, y
by fallingsquirrel 2y ago
You missed the point. There are more OSes out there. If you had to relearn a brand new "full stack experience" for every OS just to ship a cross-platform app, you wouldn't have any time left for business logic. libcurl is great and it runs everywhere.
And now for a personal opinion: I'll take libcurl over .NET's IHttpClientFactory any day.
- pjmlp 2y agoI have been programming since the glory days of 8 bit home computers, try shipping cross-platform applications in Z80 and 6502, and we still had plenty of time left to do lots of stuff. Additionally, writing little wrappers around OS APIs is something that every C programmer has known since K&R C went outside UNIX V6, which again is why POSIX became a thing.
- neonsunset 2y agoWhat? You don't need to use it explicitly most of the time. Just `new HttpClient` and cache/dispose it. Or have DI inject it for you. It will do the right thing without further input. The reason for this factory existing is pooling the underlying HttpMessageHandlers which hold an internal connection pool for efficient connection/stream(in case of HTTP2 or Quic) reuse for large applications which use DI.