doc: remove `agent.request()` call in example
authorNathan Rajlich <nathan@tootallnate.net>
Tue, 25 Mar 2014 20:02:42 +0000 (10:02 -1000)
committerNathan Rajlich <nathan@tootallnate.net>
Tue, 25 Mar 2014 20:02:42 +0000 (10:02 -1000)
The `Agent#request()` function was removed in
f3189ace6b5e31a874df421ac2f74da0e77cb14d, so don't
use it in the documentation example. The function
wasn't documented in the first place.

doc/api/http.markdown

index 6f748b75b5ef8833d3e378291541e621dfa8f706..ee877b304a5381b40178fc00eea3eca0e146ae5c 100644 (file)
@@ -619,7 +619,8 @@ To configure any of them, you must create your own `Agent` object.
 ```javascript
 var http = require('http');
 var keepAliveAgent = new http.Agent({ keepAlive: true });
-keepAliveAgent.request(options, onResponseCallback);
+options.agent = keepAliveAgent;
+http.request(options, onResponseCallback);
 ```
 
 ### agent.maxSockets