bytesnake / telebot

Write Telegram bots in Rust with Tokio and Futures
Other
212 stars 33 forks source link

Use hyper instead of Tokio Curl #23

Closed asonix closed 6 years ago

asonix commented 6 years ago

Fixes https://github.com/bytesnake/telebot/issues/21 Blocked by https://github.com/ferristseng/rust-hyper-multipart-rfc7578/pull/2

asonix commented 6 years ago

As a note: the multipart library i'm using here only works for Hyper clients, not Hyper servers, so adding a server implementation for multipart will need to happen before https://github.com/bytesnake/telebot/issues/20 is resolved.

bytesnake commented 6 years ago

Thanks for this pull request! I just came back from holidays and will merge it. Perhaps we can switch to https://github.com/abonander/multipart/ in order to support server multipart parsing, but this can be done in a further commit, including server support.

asonix commented 6 years ago

I looked at that repository, but there isn't support for Hyper 0.11, which is the only version of hyper that runs asynchronously. The author has another repository for multipart async but it is listed as pre-alpha software and says "use at your own risk".

Additionally, this pull request you just merged depends on my git version of the multipart library I am using, since the changes I made have not yet been accepted upstream. Telebot cannot release on crates.io until the dependency has been updated away from that.

bytesnake commented 6 years ago

Ok I moved the pull request to the hyper branch for now. The multipart-async crate has no client support yet, but can't we just point to a fork of the crate with in-memory support?