cacheable icon indicating copy to clipboard operation
cacheable copied to clipboard

Wrap native HTTP requests with RFC compliant cache support

Results 5 cacheable issues
Sort by recently updated
recently updated
newest added

```js const https = require('https'); const CacheableRequest = require('cacheable-request'); const cacheableRequest = new CacheableRequest(https.request); const cacheReq = cacheableRequest('https://unpkg.com/[email protected]/dist/vue.js'); cacheReq.on('request', req => { req.end(); // This is invalid usage!!! // Instead:...

enhancement
investigating

For https://github.com/sindresorhus/got/pull/827 we need the remoteAddress in the cache. This would require (as I understand correctly) `connection: { remoteAddress: response.connection.remoteAddress }` in the following lines: https://github.com/lukechilds/cacheable-request/blob/d50e6af350b6f52814c71ce3908e704a3d5f428e/src/index.js#L119-L124 And a connection parameter...

enhancement

Fixes #194 It looks like it's not a dev-only dependency as it prevents pendants from using this project, so I think that the move is justified. Tested using npm link,...

**Describe the bug** When using `[email protected]` in my TypeScript project, I get the following error when trying to compile it: ``` maxim@ubuntu:~/google-api-typings-generator$ tsc node_modules/cacheable-request/dist/types.d.ts:7:35 - error TS7016: Could not find...

bug

**Describe the bug** The `CacheResponse` type is defined as `ServerResponse | typeof ResponseLike`. I believe the intention is `IncomingMessage | typeof ResponseLike`. The `ServerResponse` type is used for outgoing responses,...

bug