redirect and error reform

- `Error` has been made an opaque struct.
- `RedirectPolicy` now makes use of `RedirectAttempt` and `RedirectAction`.
This commit is contained in:
Sean McArthur
2017-05-05 09:59:12 -07:00
parent b0ef498f77
commit d514d4e6e8
6 changed files with 284 additions and 103 deletions

View File

@@ -207,10 +207,7 @@ fn test_redirect_policy_can_return_errors() {
};
let err = reqwest::get(&format!("http://{}/loop", server.addr())).unwrap_err();
match err {
reqwest::Error::RedirectLoop => (),
e => panic!("wrong error received: {:?}", e),
}
assert!(err.is_redirect());
}
#[test]