remove frivolous mime guessing dep
This commit is contained in:
12
src/agent.rs
12
src/agent.rs
@@ -332,18 +332,6 @@ fn basic_auth(user: &str, pass: &str) -> String {
|
||||
::base64::encode(&format!("{}:{}", safe, pass))
|
||||
}
|
||||
|
||||
fn mime_of<S: Into<String>>(s: S) -> String {
|
||||
let s = s.into();
|
||||
match &s[..] {
|
||||
"json" => "application/json",
|
||||
"form" => "application/x-www-form-urlencoded",
|
||||
_ => match ::mime_guess::get_mime_type_str(&s) {
|
||||
Some(mime) => mime,
|
||||
None => "foo",
|
||||
},
|
||||
}.to_string()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user