pub fn clone_body_fn<F, B>(f: F) -> CloneBodyFn<F>
where F: Fn(&B) -> Option<B>,
Available on crate feature follow-redirect only.
Expand description

Create a new redirection Policy from a closure F: Fn(&B) -> Option<B>.

clone_body method of the returned Policy delegates to the wrapped closure and redirect method always returns Action::Follow.