From 887902ec17a6874049dc31ce31d698c4cd736b4c Mon Sep 17 00:00:00 2001 From: Esteban Borai Date: Fri, 9 Oct 2020 21:46:52 -0300 Subject: [PATCH] add: getters for status code and data-length --- src/response.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/response.rs b/src/response.rs index 4eaf29a3e..584fc270d 100644 --- a/src/response.rs +++ b/src/response.rs @@ -436,6 +436,16 @@ where Ok(()) } + + /// Retrieves the current value of the `Response` status code + pub fn get_status_code(&self) -> StatusCode { + self.status_code.clone() + } + + /// Retrieves the current value of the `Response` data length + pub fn get_data_length(&self) -> Option { + self.data_length.clone() + } } impl Response