Skip to content

Commit 87c6bbe

Browse files
committed
Proxy-Authorization docs tweak
1 parent 0723ea0 commit 87c6bbe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Attempts to connect to the web server through the given proxy server. The method
172172
* `scheme` - The protocol to use between the proxy server and the remote host (`http` or `https`). If `https` is specified as the scheme, `connect_proxy()` makes a `CONNECT` request to establish a TCP tunnel to the remote host through the proxy server.
173173
* `host` - The hostname of the remote host to connect to.
174174
* `port` - The port of the remote host to connect to.
175-
* `proxy_authorization` - The `Proxy-Authorization` header value send to proxy server via `CONNECT` when the `scheme` is `https`.
175+
* `proxy_authorization` - The `Proxy-Authorization` header value sent to the proxy server via `CONNECT` when the `scheme` is `https`.
176176

177177
If an error occurs during the connection attempt, this method returns `nil` with a string describing the error. If the connection was successfully established, the method returns `1`.
178178

@@ -222,11 +222,9 @@ In case of success, returns `1`. In case of errors, returns `nil, err`. In the c
222222
Configure an http proxy to be used with this client instance. The `opts` is a table that accepts the following fields:
223223

224224
* `http_proxy` - an URI to a proxy server to be used with http requests
225-
* `http_proxy_authorization` - a value for `Proxy-Authorization` header to be used with `http_proxy`, e.g. `Basic ZGVtbzp0ZXN0`.
226-
The `httpc:request_uri` can override the setting by specifying `Proxy-Authorization` header.
225+
* `http_proxy_authorization` - a default `Proxy-Authorization` header value to be used with `http_proxy`, e.g. `Basic ZGVtbzp0ZXN0`, which will be overriden if the `Proxy-Authorization` request header is present.
227226
* `https_proxy` - an URI to a proxy server to be used with https requests
228-
* `https_proxy_authorization` - a value for `Proxy-Authorization` header to be used with `https_proxy`, e.g. `Basic ZGVtbzpwYXNz`.
229-
The `httpc:request_uri` can override the setting by specifying `Proxy-Authorization` header.
227+
* `https_proxy_authorization` - as `http_proxy_authorization` but for use with `https_proxy`.
230228
* `no_proxy` - a comma separated list of hosts that should not be proxied.
231229

232230
Note that proxy options are only applied when using the high-level `request_uri()` API.

0 commit comments

Comments
 (0)