Skip to content

Commit

Permalink
add: getters for status code and data-length
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Oct 10, 2020
1 parent 325af94 commit 887902e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/response.rs
Expand Up @@ -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<usize> {
self.data_length.clone()
}
}

impl<R> Response<R>
Expand Down

0 comments on commit 887902e

Please sign in to comment.