mirror of
https://github.com/nushell/nushell.git
synced 2025-07-14 21:35:58 +02:00
add support for the text/csv content-type (#2587)
This commit is contained in:
@ -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(|_| {
|
||||||
|
Reference in New Issue
Block a user