Add Error::{kind, status, into_response}.
Also, remove Response::{ok, error, client_error, server_error,
redirect}. The idea is that you would access these through the
Error object instead.
I fetched all the reverse dependencies of ureq on crates.io and looked
for uses of the methods being removed. I found none.
I'm also considering removing the error_on_non_2xx method entirely. If
it's easy to get the underlying response for errors, it would be nice to
make that the single way to do things rather than support two separate
ways of handling HTTP errors.
This commit is contained in:
committed by
Martin Algesten
parent
35c03521b9
commit
4c3b93d86d
@@ -175,7 +175,6 @@ pub fn no_status_text() {
|
||||
test::make_response(200, "", vec![], vec![])
|
||||
});
|
||||
let resp = get("test://host/no_status_text").call().unwrap();
|
||||
assert!(resp.ok());
|
||||
assert_eq!(resp.status(), 200);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user