add support for the text/csv content-type (#2587)

This commit is contained in:
Ryan Blecher 2020-09-21 23:26:20 -04:00 committed by GitHub
parent b133724b38
commit 8388afc9d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,6 +190,15 @@ async fn helper(
) )
.into_value(tag), .into_value(tag),
)), )),
(mime::TEXT, mime::CSV) => Ok((
Some("csv".to_string()),
UntaggedValue::string(
r.body_string()
.await
.map_err(|e| generate_error("text", e, &span))?,
)
.into_value(tag),
)),
(mime::TEXT, mime::PLAIN) => { (mime::TEXT, mime::PLAIN) => {
let path_extension = url::Url::parse(location) let path_extension = url::Url::parse(location)
.map_err(|_| { .map_err(|_| {