1.2.1 • Published 5 years ago

@zeit/fetch-cached-dns v1.2.1

Weekly downloads
15,272
License
MIT
Repository
github
Last release
5 years ago

fetch-cached-dns

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

How to use

const fetch = require('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

1.2.1

5 years ago

1.2.0

5 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago