How to use cacheable-request - 3 common examples

To help you get started, we’ve selected a few cacheable-request examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Hackdromeda / BugBrowser / node_modules / got / index.js View on Github external
cacheReq.on('error', err => {
			if (err instanceof CacheableRequest.RequestError) {
				ee.emit('error', new got.RequestError(err, opts));
			} else {
				ee.emit('error', new got.CacheError(err, opts));
			}
		});
github sx1989827 / DOClever / node_modules / got / index.js View on Github external
cacheReq.on('error', err => {
			if (err instanceof CacheableRequest.RequestError) {
				ee.emit('error', new got.RequestError(err, opts));
			} else {
				ee.emit('error', new got.CacheError(err, opts));
			}
		});
github htaussig / ProcProj / canvasSketch / future3D / node_modules / got / source / request-as-event-emitter.js View on Github external
cacheRequest.once('error', error => {
				if (error instanceof CacheableRequest.RequestError) {
					emitError(new RequestError(error, options));
				} else {
					emitError(new CacheError(error, options));
				}
			});

cacheable-request

Wrap native HTTP requests with RFC compliant cache support

MIT
Latest version published 11 days ago

Package Health Score

95 / 100
Full package analysis

Popular cacheable-request functions