Commit graph

9 commits

Author SHA1 Message Date
Waffle
7c18750a8f Remove dbg! print 2021-02-17 14:23:13 +03:00
Waffle
8abf3863e5 Future proof multipart requests 2021-02-16 17:16:20 +03:00
Waffle
71d90002ce update dependencies 2021-01-07 15:58:51 +03:00
Waffle
84ac0212e8 Remove legacy code 2020-12-06 16:31:28 +03:00
Waffle
17b44db578 Add ApiUrl
Add `ApiUrl` and also use `Url` instead of `&str` for urls to clean code
2020-11-17 22:38:30 +03:00
Waffle
fa0e86c547 Add internal ability to change API url
Recently, telegram has published [Telegram Bot API Server] - HTTP API <->
MTPROTO proxy which is used internally by telegram. Now it's possible to run
the server locally.

However currently it's not possible to use teloxide with such local server,
because API url is hardcoded into teloxide.

This commit makes _internall_ changes to allow setting the API url. It doesn't
yet allow to set the url from user code (i.e.: no changes in public API), in my
opinion such additions are blocked on some bot refactorings.

`Bot::api_url` is made `Option<Arc<str>>` to minimize costs in case of 'default
url' (probably the most common case).

Progress of this issue is tracked in https://github.com/teloxide/teloxide/issues/317

[Telegram Bot API Server]: https://github.com/tdlib/telegram-bot-api
2020-11-16 14:14:00 +03:00
Waffle
07a403c279 implement default Bot's {Json,Multipart}Request 2020-09-19 20:30:36 +03:00
Waffle
5afe72b368 rewrite requests to use serde-multipart
Rewrite multipart requests to use serde_multipart instead of FromBuilder
2020-08-16 00:21:55 +03:00
Waffle
a70cb4e008 Move core code from teloxide 2020-08-12 19:39:40 +03:00