feat(lib): replace types with those from http crate
BREAKING CHANGE: `Method`, `Request`, `Response`, `StatusCode`, `Version`, and `Uri` have been replaced with types from the `http` crate. The `hyper::header` module is gone for now. Removed `Client::get`, since it needed to construct a `Request<B>` with an empty body. Just use `Client::request` instead. Removed `compat` cargo feature, and `compat` related API.
This commit is contained in:
		| @@ -418,11 +418,11 @@ impl Service for MockConnector { | ||||
|  | ||||
|     fn call(&self, uri: Uri) -> Self::Future { | ||||
|         use futures::future; | ||||
|         trace!("mock connect: {:?}", uri.as_ref()); | ||||
|         trace!("mock connect: {}", uri); | ||||
|         let mut mocks = self.mocks.borrow_mut(); | ||||
|         let mocks = mocks.get_mut(uri.as_ref()) | ||||
|             .expect(&format!("unknown mocks uri: {:?}", uri.as_ref())); | ||||
|         assert!(!mocks.is_empty(), "no additional mocks for {:?}", uri.as_ref()); | ||||
|         let mocks = mocks.get_mut(&uri.to_string()) | ||||
|             .expect(&format!("unknown mocks uri: {}", uri)); | ||||
|         assert!(!mocks.is_empty(), "no additional mocks for {}", uri); | ||||
|         future::ok(mocks.remove(0)) | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user