Provide .method() and .query_params()
This commit is contained in:
10
src/error.rs
10
src/error.rs
@@ -1,4 +1,4 @@
|
||||
use url::Url;
|
||||
use url::{ParseError, Url};
|
||||
|
||||
use std::error;
|
||||
use std::fmt::{self, Display};
|
||||
@@ -315,6 +315,14 @@ impl From<Transport> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ParseError> for Error {
|
||||
fn from(err: ParseError) -> Self {
|
||||
ErrorKind::InvalidUrl
|
||||
.msg(&format!("failed to parse URL: {:?}", err))
|
||||
.src(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ErrorKind {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user