@@ -24,7 +24,8 @@ impl Proxy {
24
24
/// * `url` - The URL of the proxy server.
25
25
/// * `username` - Optional username for proxy authentication.
26
26
/// * `password` - Optional password for proxy authentication.
27
- /// * `custom_http_auth` - Optional custom HTTP authentication header value.
27
+ /// * `custom_http_auth` - Optional custom HTTP proxy authentication header value.
28
+ /// * `custom_http_headers` - Optional custom HTTP proxy headers.
28
29
/// * `exclusion` - Optional list of domains to exclude from proxying.
29
30
///
30
31
/// # Returns
@@ -44,7 +45,7 @@ impl Proxy {
44
45
username = None ,
45
46
password = None ,
46
47
custom_http_auth = None ,
47
- custom_httt_headers = None ,
48
+ custom_http_headers = None ,
48
49
exclusion = None ,
49
50
) ) ]
50
51
#[ inline]
@@ -53,7 +54,7 @@ impl Proxy {
53
54
username : Option < & str > ,
54
55
password : Option < & str > ,
55
56
custom_http_auth : Option < & str > ,
56
- custom_httt_headers : Option < HeaderMapFromPy > ,
57
+ custom_http_headers : Option < HeaderMapFromPy > ,
57
58
exclusion : Option < & str > ,
58
59
) -> PyResult < Self > {
59
60
Self :: create_proxy (
@@ -62,7 +63,7 @@ impl Proxy {
62
63
username,
63
64
password,
64
65
custom_http_auth,
65
- custom_httt_headers ,
66
+ custom_http_headers ,
66
67
exclusion,
67
68
)
68
69
}
@@ -76,7 +77,8 @@ impl Proxy {
76
77
/// * `url` - The URL of the proxy server.
77
78
/// * `username` - Optional username for proxy authentication.
78
79
/// * `password` - Optional password for proxy authentication.
79
- /// * `custom_http_auth` - Optional custom HTTP authentication header value.
80
+ /// * `custom_http_auth` - Optional custom HTTP proxy authentication header value.
81
+ /// * `custom_http_headers` - Optional custom HTTP proxy headers.
80
82
/// * `exclusion` - Optional list of domains to exclude from proxying.
81
83
///
82
84
/// # Returns
@@ -96,7 +98,7 @@ impl Proxy {
96
98
username = None ,
97
99
password = None ,
98
100
custom_http_auth = None ,
99
- custom_httt_headers = None ,
101
+ custom_http_headers = None ,
100
102
exclusion = None ,
101
103
) ) ]
102
104
#[ inline]
@@ -105,7 +107,7 @@ impl Proxy {
105
107
username : Option < & str > ,
106
108
password : Option < & str > ,
107
109
custom_http_auth : Option < & str > ,
108
- custom_httt_headers : Option < HeaderMapFromPy > ,
110
+ custom_http_headers : Option < HeaderMapFromPy > ,
109
111
exclusion : Option < & str > ,
110
112
) -> PyResult < Self > {
111
113
Self :: create_proxy (
@@ -114,7 +116,7 @@ impl Proxy {
114
116
username,
115
117
password,
116
118
custom_http_auth,
117
- custom_httt_headers ,
119
+ custom_http_headers ,
118
120
exclusion,
119
121
)
120
122
}
@@ -128,7 +130,8 @@ impl Proxy {
128
130
/// * `url` - The URL of the proxy server.
129
131
/// * `username` - Optional username for proxy authentication.
130
132
/// * `password` - Optional password for proxy authentication.
131
- /// * `custom_http_auth` - Optional custom HTTP authentication header value.
133
+ /// * `custom_http_auth` - Optional custom HTTP proxy authentication header value.
134
+ /// * `custom_http_headers` - Optional custom HTTP proxy headers.
132
135
/// * `exclusion` - Optional list of domains to exclude from proxying.
133
136
///
134
137
/// # Returns
@@ -148,7 +151,7 @@ impl Proxy {
148
151
username = None ,
149
152
password = None ,
150
153
custom_http_auth = None ,
151
- custom_httt_headers = None ,
154
+ custom_http_headers = None ,
152
155
exclusion = None ,
153
156
) ) ]
154
157
#[ inline]
@@ -157,7 +160,7 @@ impl Proxy {
157
160
username : Option < & str > ,
158
161
password : Option < & str > ,
159
162
custom_http_auth : Option < & str > ,
160
- custom_httt_headers : Option < HeaderMapFromPy > ,
163
+ custom_http_headers : Option < HeaderMapFromPy > ,
161
164
exclusion : Option < & str > ,
162
165
) -> PyResult < Self > {
163
166
Self :: create_proxy (
@@ -166,7 +169,7 @@ impl Proxy {
166
169
username,
167
170
password,
168
171
custom_http_auth,
169
- custom_httt_headers ,
172
+ custom_http_headers ,
170
173
exclusion,
171
174
)
172
175
}
@@ -179,7 +182,7 @@ impl Proxy {
179
182
username : Option < & ' a str > ,
180
183
password : Option < & str > ,
181
184
custom_http_auth : Option < & ' a str > ,
182
- custom_httt_headers : Option < HeaderMapFromPy > ,
185
+ custom_http_headers : Option < HeaderMapFromPy > ,
183
186
exclusion : Option < & ' a str > ,
184
187
) -> PyResult < Self > {
185
188
let mut proxy = proxy_fn ( url) . map_err ( Error :: RquestError ) ?;
@@ -194,8 +197,8 @@ impl Proxy {
194
197
}
195
198
196
199
// Convert the custom HTTP headers to a HeaderMap instance.
197
- if let Some ( custom_httt_headers ) = custom_httt_headers {
198
- proxy = proxy. custom_http_headers ( custom_httt_headers . 0 )
200
+ if let Some ( custom_http_headers ) = custom_http_headers {
201
+ proxy = proxy. custom_http_headers ( custom_http_headers . 0 )
199
202
}
200
203
201
204
// Convert the exclusion list to a NoProxy instance.
0 commit comments