feat(ffi): add hyper_request_on_informational
This defines an extension type used in requests for the client that is used to setup a callback for receipt of informational (1xx) responses. The type isn't currently public, and is only usable in the C API.
This commit is contained in:
		| @@ -57,3 +57,14 @@ pub(crate) enum Dispatched { | ||||
|     #[cfg(feature = "http1")] | ||||
|     Upgrade(crate::upgrade::Pending), | ||||
| } | ||||
|  | ||||
| impl MessageHead<http::StatusCode> { | ||||
|     fn into_response<B>(self, body: B) -> http::Response<B> { | ||||
|         let mut res = http::Response::new(body); | ||||
|         *res.status_mut() = self.subject; | ||||
|         *res.headers_mut() = self.headers; | ||||
|         *res.version_mut() = self.version; | ||||
|         *res.extensions_mut() = self.extensions; | ||||
|         res | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user