@@ -42,13 +42,13 @@ console.log('using proxy server %j', proxy);
4242// HTTPS endpoint for the proxy to connect to
4343var endpoint = process .argv [2 ] || ' https://graph.facebook.com/tootallnate' ;
4444console .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
4848var 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);
7171console .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
7979var socket = new WebSocket (endpoint, { agent: agent });
@@ -92,13 +92,13 @@ socket.on('message', function (data, flags) {
9292API
9393---
9494
95- ### new HttpsProxyAgent(opts )
95+ ### new HttpsProxyAgent(Object options )
9696
9797The ` HttpsProxyAgent ` class implements an ` http.Agent ` subclass that connects
9898to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
9999requests. 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