When using type: 'text', cached responses are returned as buffers instead of strings. For example:
import Fetch from '@11ty/eleventy-fetch'
const response = await Fetch('https://11ty.dev/', {
duration: '1d',
type: 'text',
})
console.log(response.constructor.name)
When running this for the first time, String is logged; for subsequent runs this returns Buffer until the cache runs out.
This affects versions v5.1.0-beta.1 and up.
When using
type: 'text', cached responses are returned as buffers instead of strings. For example:When running this for the first time,
Stringis logged; for subsequent runs this returnsBufferuntil the cache runs out.This affects versions
v5.1.0-beta.1and up.