glynnbird commented on code in PR #383:
URL: https://github.com/apache/couchdb-nano/pull/383#discussion_r4445000966


##########
README.md:
##########
@@ -229,19 +229,14 @@ const agentOptions = {
   connections: null,
   maxRedirections: 0
 }
-const undici = require('undici')
-const undiciOptions = new undici.Agent(agentOptions)
-const nano = Nano({ url: 'http://127.0.0.1:5984', undiciOptions })
+const { Agent, install } = require('undici')
+// use the installed Undici's fetch to avoid incompatibility with Node.js 
built-in
+install()

Review Comment:
   I can see why I'd want to document `Nano({ url, agentOptions: new 
Dispatcher1Wrapper(new Agent(opts)) })` as the supported means of overriding 
the agent. That's fine.
   
   But the `install` bit is just to get the tests to to work. Without 
`install`, a bunch of the tests fails when I jump to Undici@8 - something to do 
with how the `body` is matched in the interceptor. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to