Add client support for server push (#314)
This patch exposes push promises to the client API. Closes #252
This commit is contained in:
committed by
Carl Lerche
parent
6d8554a23c
commit
6b23542a55
@@ -380,6 +380,13 @@ impl PushPromise {
|
||||
}
|
||||
}
|
||||
|
||||
impl PushPromise {
|
||||
/// Consume `self`, returning the parts of the frame
|
||||
pub fn into_parts(self) -> (Pseudo, HeaderMap) {
|
||||
(self.header_block.pseudo, self.header_block.fields)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "unstable")]
|
||||
impl PushPromise {
|
||||
pub fn new(
|
||||
@@ -400,10 +407,6 @@ impl PushPromise {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn into_parts(self) -> (Pseudo, HeaderMap) {
|
||||
(self.header_block.pseudo, self.header_block.fields)
|
||||
}
|
||||
|
||||
pub fn fields(&self) -> &HeaderMap {
|
||||
&self.header_block.fields
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user