{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreicyfaiodw7kmpn3li7pnnlddu4xskhlpkegpufqrepyc5jdbvjfdq",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mglanyd6rdf2"
},
"path": "/t/fork-basement-as-baseplate/12415?page=5#post_84",
"publishedAt": "2026-03-08T16:19:22.000Z",
"site": "https://discourse.haskell.org",
"textContent": "In basically any other language as well, foreign bindings to curl or the like are how http is often done, and even then, in those languages, shelling out to curl is significantly more robust. It is simply that because haskell cares more about code that is both _statically compiled_ and _cross-platform_ the desire for a fully native library is stronger.\n\nThat said, let me explain, based on experience, _why_ shelling out to curl is more robust than linking libcurl. Libcurl has the basic power in terms of protocol and settings as curl-the-executable of course. However, it does _not_ have those settings configured as users would desire them. It needs special flags or multiple calls to discover where certificates are and load them robustly, to follow redirect paths which the binary client will follow automatically, etc. This is particularly striking/onerous with proxy settings, where depending on OS and version, they may be in a _ton_ of different places, in one of a few formats. Libcurl doesn’t automatically search all the different places different systems may have proxies configured (especially in the presence of proxies set by endpoint security systems), but the executable has that additional logic wired in. The library is a swiss-army-knife for configuring and then making precise HTTP calls, but the executable is the tool that is able to interpret “do all the things you need to in order to retrieve this remote file” which is a much broader task. Effectively, no matter what language you are in, if you want to make your program robust under the greatest number of possible end-user situations, then you will be best served by shelling out to curl.",
"title": "Fork `basement`? As `baseplate`?"
}