// Some sites don't respond to a stream response type correctly, especially with a HEAD. Try a GET with a text response type
if (
(response === undefined ||
response.status < 200 ||
response.status >= 300) &&
!options.crawl
) {
response = await request<Readable>({
method: 'GET',
url: options.url.href,
responseType: 'stream'
Note that responseType is 'stream', although the comment implies that it should be 'text'.
In
index.ts
we find the following:Note that
responseType
is'stream'
, although the comment implies that it should be'text
'.