aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/request.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-06 17:37:35 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-06 17:37:35 +0200
commit7aa211a8d7ae2efeebd9362699a1aea4b5690e3d (patch)
treee0af8720ee3b770688600a8ea025de2ce81e5017 /src/encoding/request.rs
parent7177367ae41a5e2d6ed401f60ee1455812dd8ffb (diff)
downloadsip-rs-7aa211a8d7ae2efeebd9362699a1aea4b5690e3d.tar
sip-rs-7aa211a8d7ae2efeebd9362699a1aea4b5690e3d.tar.bz2
sip-rs-7aa211a8d7ae2efeebd9362699a1aea4b5690e3d.tar.zst
start on sdp impl
Diffstat (limited to 'src/encoding/request.rs')
-rw-r--r--src/encoding/request.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/encoding/request.rs b/src/encoding/request.rs
index c62bab3..ab41b7c 100644
--- a/src/encoding/request.rs
+++ b/src/encoding/request.rs
@@ -7,6 +7,7 @@ pub struct Request {
pub method: Method,
pub uri: Uri,
pub headers: HeaderMap,
+ pub body: String,
}
impl Display for Request {
@@ -15,6 +16,7 @@ impl Display for Request {
headers,
method,
uri,
+ ..
} = self;
write!(f, "{method} {uri} SIP/2.0\r\n")?;
write!(f, "{headers}\r\n")?;
@@ -46,6 +48,7 @@ impl FromStr for Request {
let method = Method::from_str(method)?;
Ok(Self {
+ body: String::new(),
headers,
method,
uri,