Add ClientBuilder::h2_prior_knowlege() (#443)

resolves https://github.com/seanmonstar/reqwest/issues/413
This commit is contained in:
Evan Schwartz
2019-01-18 17:15:57 -05:00
committed by Sean McArthur
parent 021851afd4
commit 6e8e781f8f
2 changed files with 34 additions and 6 deletions

View File

@@ -293,6 +293,19 @@ impl ClientBuilder {
self.inner = func(self.inner);
self
}
/// Only use HTTP/2.
///
/// # Example
///
/// ```
/// let client = reqwest::Client::builder()
/// .h2_prior_knowledge()
/// .build().unwrap();
/// ```
pub fn h2_prior_knowledge(self) -> ClientBuilder {
self.with_inner(|inner| inner.h2_prior_knowledge())
}
}