curl-rust icon indicating copy to clipboard operation
curl-rust copied to clipboard

Async Implementation

Open LorenzoLeonardo opened this issue 3 years ago • 2 comments

Hello Alex

Is there an async implementation of this crate?

LorenzoLeonardo avatar Oct 24 '22 03:10 LorenzoLeonardo

It is possible to use libcurl in an asynchronous fashion using the non-blocking multi API, you can see an example of how this is done here (though that is pretty outdated). We don't provide any helpers for doing this as that is outside the scope of this repo, which is specifically to provide safe Rust bindings to libcurl.

If you want a higher-level async HTTP client based on curl you could take a look at Isahc, which is implemented on top of this crate in an async manner, using the multi API as I mentioned.

sagebind avatar Oct 24 '22 04:10 sagebind

I have already created async implementation on top of this. This might be helpful for those who want to do Curl Asynchronously. https://github.com/LorenzoLeonardo/async-curl (Actor) https://github.com/LorenzoLeonardo/curl-http-client (Ergonomic Builder that uses the Actor Model)

LorenzoLeonardo avatar Feb 06 '24 14:02 LorenzoLeonardo