Idiomatic REST API clients in Rust

What are some of the best examples on how to use Rust to make a REST client for an existing REST API? It should be large enough to be production ready and not just a toy example. Also showing ways on how testing is dont is important?

Anyone have made some nice integrations or know of others out there?


github-rs is pretty well designed, and the author has blogged about how they ended up with that design.

May be I missed something, but there is no way to use it in async way.
So current thread stops until the network reply, this is looks like huge anti-pattern for REST API client library.

Depends on your use case, although I agree ideally it'd support both sync and async. It seems like github-rs was written before the Rust ecosystem had started to mature, and nobody has had time/reason to update it yet.

Still, I think the general gist of the blog post (using types/builders to make it impossible to build an invalid request) is still relevant today, whether you're building an async client or not :slight_smile:

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