4 ms·
There are more OSes out there. I never needed curl on Windows, because on OSes that provide a full stack developer experience such things are part of the platf
by pjmlp 2y ago
There are more OSes out there.
I never needed curl on Windows, because on OSes that provide a full stack developer experience such things are part of the platform SDK, and rich language runtimes.
It is only an issue with C and C++, and their reliance on POSIX to complement the slim standard library, effectively making UNIX their "runtime" for all practical purposes.
- fallingsquirrel 2y agoYou 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.