regen with patch #265, but without version bump

Let's try to avoid spamming crates.io and instead keep publishing
everything as is. The patch will be present in some of the more
recent crates, and for specific crates like youtube3 and drive3
I will create specific patch releases.
This commit is contained in:
Sebastian Thiel
2021-04-02 20:30:46 +08:00
parent 1f776ddc54
commit 5bac5d1af5
768 changed files with 59268 additions and 121690 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -14,6 +14,7 @@ use hyper;
use hyper::header::{HeaderMap, AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, USER_AGENT};
use hyper::Method;
use hyper::StatusCode;
use hyper::body::Buf;
use mime::{Attr, Mime, SubLevel, TopLevel, Value};
use oauth2;
@@ -806,3 +807,10 @@ pub fn remove_json_null_values(value: &mut json::value::Value) {
_ => {}
}
}
// Borrowing the body object as mutable and converts it to a string
pub async fn get_body_as_string(res_body: &mut hyper::Body) -> String {
let res_body_buf = hyper::body::aggregate(res_body).await.unwrap();
let res_body_string = String::from_utf8_lossy(res_body_buf.chunk());
res_body_string.to_string()
}