2.1.2 • Published 2 years ago

@vercel/fetch-cached-dns v2.1.2

Weekly downloads
1,748
License
MIT
Repository
github
Last release
2 years ago

@vercel/fetch-cached-dns

Build Status

A decorator on top of fetch that caches the DNS query of the hostname of the passed URL.

How to use

const fetch = require('@vercel/fetch-cached-dns')(require('node-fetch'));

Since this implementation is implementing redirects we are providing an onRedirect extra option to the fetch call that gets called with the response object and the options that will be used for the next request. This allows to access the request from outside and to modify the options.

NOTE: if the fetch implementation is not supplied, it will attempt to use peerDep node-fetch

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago