chipp_http 1.3.0

curl-based HTTP client library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::curl::easy;
use crate::Interceptor;
use crate::Request;

pub struct ProxyInterceptor(&'static str);

impl Interceptor for ProxyInterceptor {
    fn modify(&self, easy: &mut easy::Easy, _request: &Request) {
        easy.proxy(self.0).unwrap();
        easy.ssl_verify_host(false).unwrap();
    }

    fn add_headers(&self, _headers: &mut easy::List, _request: &Request) {}
}