impl get_body method in request to get json body data
This commit is contained in:
parent
ad4fdc300d
commit
c4e46581a9
@ -66,6 +66,14 @@ impl<'a> HTTPRequest<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// get_body returns the body data as JsonValue
|
||||||
|
pub fn get_body(&self) -> Option<&JsonValue> {
|
||||||
|
match self.body {
|
||||||
|
Some(ref b) => Some(b.get_data()),
|
||||||
|
None => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_target(&self) -> &str {
|
pub fn get_target(&self) -> &str {
|
||||||
self.start_line.get_target()
|
self.start_line.get_target()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user