add defaults to docs about gzip and redirect

This commit is contained in:
Sean McArthur
2017-05-18 11:29:32 -07:00
parent d8696045b4
commit dfaf25d1cb

View File

@@ -67,11 +67,15 @@ impl Client {
} }
/// Enable auto gzip decompression by checking the ContentEncoding response header. /// Enable auto gzip decompression by checking the ContentEncoding response header.
///
/// Default is enabled.
pub fn gzip(&mut self, enable: bool) { pub fn gzip(&mut self, enable: bool) {
self.inner.auto_ungzip.store(enable, Ordering::Relaxed); self.inner.auto_ungzip.store(enable, Ordering::Relaxed);
} }
/// Set a `RedirectPolicy` for this client. /// Set a `RedirectPolicy` for this client.
///
/// Default will follow redirects up to a maximum of 10.
pub fn redirect(&mut self, policy: RedirectPolicy) { pub fn redirect(&mut self, policy: RedirectPolicy) {
*self.inner.redirect_policy.lock().unwrap() = policy; *self.inner.redirect_policy.lock().unwrap() = policy;
} }