feat(doit): attempt to send json-encoded request

This doesn't work yet, as I am unable to unwrap the client properly.
It's a refcell that contains a BorrowMut to a hyper::Client, and
lets just, it's complicated.
This commit is contained in:
Sebastian Thiel
2015-03-16 10:35:26 +01:00
parent 814c9c9ffa
commit 9a58b0badd
4 changed files with 47 additions and 6 deletions

View File

@@ -53,10 +53,10 @@ struct JsonServerError {
/// uploading media
pub trait Delegate {
/// Called whenever there is an HttpError, usually if there are network problems.
/// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems.
///
/// Return retry information.
fn connection_error(&mut self, hyper::HttpError) -> oauth2::Retry {
fn http_error(&mut self, &hyper::HttpError) -> oauth2::Retry {
oauth2::Retry::Abort
}
}
@@ -77,4 +77,4 @@ pub enum Result<T = ()> {
/// It worked !
Success(T),
}
}