add streaming body to requests and responses #3
1 changed files with 4 additions and 0 deletions
|
@ -60,6 +60,10 @@ pub struct Req<M: Message> {
|
|||
}
|
||||
|
||||
impl<M: Message> Req<M> {
|
||||
pub fn new(v: M) -> Result<Self, Error> {
|
||||
Ok(v.into_req()?)
|
||||
}
|
||||
|
||||
pub fn with_stream_from_buffer(self, b: Bytes) -> Self {
|
||||
Self {
|
||||
stream: AttachedStream::Fixed(b),
|
||||
|
|
Loading…
Reference in a new issue