szmarczak / http2-wrapper

Use HTTP/2 the same way like HTTP/1
MIT License
240 stars 18 forks source link

Http2 and cache issue #47

Closed yovanoc closed 4 years ago

yovanoc commented 4 years ago

I don't know if I had to put this on Got or here but there is still a problem with http2 and cache option

/Users/devchris/Desktop/project/node_modules/responselike/src/index.js:18
            throw new TypeError('Argument `url` should be a string');
         ^
TypeError: Argument `url` should be a string
    at new Response (/Users/devchris/Desktop/project/node_modules/responselike/src/index.js:18:10)
    at ClientRequest.handler (/Users/devchris/Desktop/project/node_modules/cacheable-request/src/index.js:89:19)
    at Object.onceWrapper (events.js:421:26)
    at ClientRequest.emit (events.js:326:22)
    at ClientRequest.EventEmitter.emit (domain.js:486:12)
    at ClientRequest.origin.emit (/Users/devchris/Desktop/project/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
    at /Users/devchris/Desktop/project/node_modules/http2-wrapper/source/client-request.js:319:16
    at ClientHttp2Stream.<anonymous> (/Users/devchris/Desktop/project/node_modules/http2-wrapper/source/client-request.js:262:7)
    at Object.onceWrapper (events.js:421:26)
    at ClientHttp2Stream.emit (events.js:314:20)
szmarczak commented 4 years ago

It uses response.url which is not documented. Fixing this rn.