Re:Ask HN: What open source project, in your opinion, has th...
by posix_compliant on Monday March 11, 2019 @05:57PM
(#19363252)
Getting a resource in requests:
Getting a resource with libcurl:
[ Parent
| on HN ]
Re:Ask HN: What open source project, in your opinion, has th...
by detaro on Monday March 11, 2019 @06:00PM
(#19363279)
Doesn't answer the question why nobody has build an interface like the first example over the low-level libcurl bindings, or if someone has done so, why it hasn't been more popular.
I'd guess: because distributing packages with native dependencies is sort of a a pain, and was way worse in the past, especially cross-platform, and thus python-only packages are preferred. Leaves open why libcurl bindings weren't choosen for stdlib.
Re:Ask HN: What open source project, in your opinion, has th...
by busterarm on Monday March 11, 2019 @07:04PM
(#19363747)
Since we're on the topic of code quality, this example is an incredibly strong indication that you should be using an interface.
And while the requests library might be shorter/easier, it doesn't offer nearly the guarantees that it will exhibit the expected behavior nor the feature flexibility that libcurl does.