Must have features for HTTP client

I'd like here to hear what features people fight necessary for HTTP client?

I'm planning to work on minimal synchronous and asynchronous HTTP client without huge dependencies like hyper or tokio.
For that purpose I'm looking to find out what people would need in HTTP client

In what aspect it's supposed to be minimal? In resource requirements — is it for embedded systems? In fast compilation — is it for build-time deps? In executable overhead — only using system libraries?

For example, I imagine a client that on macOS is only a wrapper for NSURLSession, so that I don't need to compile and ship my own TLS code, and the whole thing already perfectly integrates with the system.

While platform API is an viable option, I'm not sure yet it would be viable on Linux and/or POSIX.

My goal is to have minimal amount of dependencies.
Ideally only HTTP parser and rustls

Apparently the first requirement is for an HTTP client that works.

In this article: Sergey Davidoff tests a whole bunch of Rust HTTP clients. His conclusion:

"The place of the go-to Rust HTTP client is sadly vacant.... Rust libraries are also broken, but not hopelessly so. Let’s fix them and usher in a new era of performant, secure and reliable software."

There are several already exists (minimal + sync + async + without hyper etc). Why one more?

FYI I'm working on an "embedded" system - not bare-metal, just a tiny custom board running Linux and a light Yocto. I needed an HTTP client mainly for downloading firmware updates, so had very few needs apart auth and TLS.
I choose reqwest because I didn't give much thought about it, but now that we're leaving the proto phase I'll probably switch to something like atohttpc because it doesn't bring the whole tokio ecosystem with it, which I don't need client-side - a bunch of threads running handmade state-machines is easier to debug for me.
As @kornel said everyone has its specific needs, find what your crate wants to be (and wants to not be), and do it well.

The topic asks people for features that they seek in HTTP client, not whether it is necessary or not.
Let's be honest, most third party HTTP clients suck (e.g. bad API like hyper, bad defaults and etc)

I see that this topic doesn't make much for people so I guess I have no expectations for proper answers

personally, i like the dom/js "fetch" in modern browsers

it's api is minimal for the most common use case (get request to a url), but it seamlessly allows using more advanced features if you need them. i realize the js api probably cannot be directly translated to rust, but i guess it can be a nice inspiration :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.