aquatic_http: bencoded response with content-length

This commit is contained in:
Joakim Frostegård 2020-07-02 13:45:56 +02:00
parent a487347a0d
commit 6b1f11635b
6 changed files with 126 additions and 12 deletions

View file

@ -169,7 +169,7 @@ pub enum Response {
impl Response {
pub fn to_http_string(self) -> String {
"(response)".to_string()
pub fn to_bytes(self) -> Vec<u8> {
bendy::serde::to_bytes(&self).unwrap()
}
}