Skip to content

Commit a7f4fc5

Browse files
authored
feat: allow passing a http.Agent to the grpc client (#3477)
Follows on from #3474 and allows using http.Agents with node.js to control the behaviour of the underlying node http client.
1 parent f560b4d commit a7f4fc5

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"dependencies": {
5454
"any-signal": "^2.0.0",
5555
"bignumber.js": "^9.0.0",
56-
"cids": "^1.0.0",
56+
"cids": "^1.1.5",
5757
"debug": "^4.1.1",
5858
"form-data": "^3.0.0",
5959
"ipfs-core-utils": "^0.5.4",

src/dag/put.js

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module.exports = configure((api, opts) => {
2828
const cid = new CID(options.cid)
2929
encodingOptions = {
3030
...options,
31-
// @ts-expect-error - https://github.com/multiformats/js-cid/pull/138
3231
format: multicodec.getName(cid.code),
3332
hashAlg: multihash.decode(cid.multihash).name
3433
}

test/node/agent.js

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ describe('agent', function () {
8282

8383
break
8484
}
85+
86+
if (i === 4) {
87+
// should have first two responses by now
88+
expect(responses).to.have.lengthOf(2)
89+
}
8590
}
8691

8792
// wait for the final request to arrive

0 commit comments

Comments
 (0)