Treat the body as a sequence of bytes.
(self)
| 692 | impl Body { |
| 693 | /// Treat the body as a sequence of bytes. |
| 694 | pub fn into_bytes(self) -> Bytes { |
| 695 | match self.inner { |
| 696 | BodyInner::Bytes(bytes) => bytes, |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | /// Convert the body into a [`String`], erroring if it is not valid UTF-8. |
| 701 | pub fn into_string(self) -> Result<String, std::string::FromUtf8Error> { |
no outgoing calls
no test coverage detected