Skip to content

Commit

Permalink
Merge pull request #186 from EstebanBorai/feat/getters-for-response
Browse files Browse the repository at this point in the history
Feature | Getters for Response Status Code & Data Length Properties
  • Loading branch information
rawler committed Dec 30, 2020
2 parents 5ada7c1 + 31773e8 commit 4770db9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/response.rs
Expand Up @@ -433,6 +433,16 @@ where

Ok(())
}

/// Retrieves the current value of the `Response` status code
pub fn status_code(&self) -> StatusCode {
self.status_code.clone()
}

/// Retrieves the current value of the `Response` data length
pub fn data_length(&self) -> Option<usize> {
self.data_length
}
}

impl<R> Response<R>
Expand Down

0 comments on commit 4770db9

Please sign in to comment.