News for hackers. Stuff that matters.
Re:“I Could Rewrite Curl” by jeffrwells on Thursday May 20, 2021 @10:14AM (#27221345)
This begs the question of why all of these protocols should be in one library, instead of one each.

If a project is only going to ever use http, why would I need to bundle in all of the others?

Genuinely curious what the advantages are

Re:“I Could Rewrite Curl” by jolmg on Thursday May 20, 2021 @01:09PM (#27223916)
What better thing to do with a universal resource locator syntax than to have a universal client?

> If a project is only going to ever use http, why would I need to bundle in all of the others?

Your project might only ever think to use http, but my project might appreciate having one client for any URL, instead of having to parse URLs myself and decide on separate clients based on a part of it.

Re:“I Could Rewrite Curl” by lanstin on Thursday May 20, 2021 @10:32AM (#27221588)
It is a good library API with good support for async and that sort of thing. As a user it is less work to integrate the Nth protocol in a library I understand than to read the docs and try to reverse engineer some new API model of how to do things including asynchronous and configurations and TLS/cert management etc. there are a thousand ways to skin the cat, and libcurl is a good one. I want to learn a bunch of new distributed protocols because those are real things; I don’t want to learn a bunch of different APIs to do the same things because those are arbitrary wrappings to the real thing. If an API is successful enough it would be real, but cleverness in API design isn’t that useful without the popularity.
Re:“I Could Rewrite Curl” by craftinator on Thursday May 20, 2021 @10:31AM (#27221567)
My first thought is flexibility and interoperability. If you have one tool, cross platform, that supports a wide variety of protocols, you can use it on both ends of a connection, and easily swap out protocols without having to: 1) install a new tool on both sides 2) learn a new API for each protocol 3) bug check for it

It also let's you do all this dynamically, so switching protocols on the fly is trivial.

Re:“I Could Rewrite Curl” by cdelsolar on Thursday May 20, 2021 @11:31AM (#27222468)