tailhook / rotor-http

The mio/rotor based http server library for rust (UNMAINTAINED, use tk-http)
MIT License
110 stars 11 forks source link

Client Example #13

Closed KodrAus closed 8 years ago

KodrAus commented 8 years ago

Hi! Just wondering if there's any plans for a client sample for Rotor HTTP.

tailhook commented 8 years ago

It's not an example is missing, but the whole client implementation. It's cooking in client branch. Hopefully it will be ready soon. There is an example in rotor-stream, which does "very tiny subset" of HTTP, if you just want to look how client code works in rotor.

KodrAus commented 8 years ago

No problem, thanks :)

tailhook commented 8 years ago

@KodrAus it's not fully implemented yet, but simple case works: https://github.com/tailhook/rotor-http/blob/master/examples/client.rs

KodrAus commented 8 years ago

@tailhook Ah awesome, thanks for that! I'll have a play with it. It looks like it should be pretty easy to build either a callback or promise-like API on top of this.

tailhook commented 8 years ago

@KodrAus let me know, if something emerged. You can also make a pull request to the ecosystem page