Skip to content
This repository was archived by the owner on Apr 8, 2023. It is now read-only.

Commit fd7e81b

Browse files
committed
opts/options
1 parent e1420c1 commit fd7e81b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ console.log('using proxy server %j', proxy);
4242
// HTTPS endpoint for the proxy to connect to
4343
var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate';
4444
console.log('attempting to GET %j', endpoint);
45-
var opts = url.parse(endpoint);
45+
var options = url.parse(endpoint);
4646

4747
// create an instance of the `HttpsProxyAgent` class with the proxy server information
4848
var agent = new HttpsProxyAgent(proxy);
49-
opts.agent = agent;
49+
options.agent = agent;
5050

51-
https.get(opts, function (res) {
51+
https.get(options, function (res) {
5252
console.log('"response" event!', res.headers);
5353
res.pipe(process.stdout);
5454
});
@@ -71,9 +71,9 @@ var parsed = url.parse(endpoint);
7171
console.log('attempting to connect to WebSocket %j', endpoint);
7272

7373
// create an instance of the `HttpsProxyAgent` class with the proxy server information
74-
var opts = url.parse(proxy);
74+
var options = url.parse(proxy);
7575

76-
var agent = new HttpsProxyAgent(opts);
76+
var agent = new HttpsProxyAgent(options);
7777

7878
// finally, initiate the WebSocket connection
7979
var socket = new WebSocket(endpoint, { agent: agent });
@@ -92,13 +92,13 @@ socket.on('message', function (data, flags) {
9292
API
9393
---
9494

95-
### new HttpsProxyAgent(opts)
95+
### new HttpsProxyAgent(Object options)
9696

9797
The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
9898
to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
9999
requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
100100

101-
The `opts` argument may either be a string URI of the proxy server to use, or an
101+
The `options` argument may either be a string URI of the proxy server to use, or an
102102
"options" object with more specific properties:
103103

104104
* `host` - String - Proxy host to connect to (may use `hostname` as well). Required.

0 commit comments

Comments
 (0)