Skip to content

Commit

Permalink
add headers into the fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchoz49 committed Sep 18, 2023
1 parent 79772bd commit ffee728
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export const write = async (path, opts = {}) => {
Object.keys(headers).forEach((value, key) => {
h.set(String(key), value)
})
return fetch(file.url).then(res => res.arrayBuffer()).then(buf => Buffer.from(buf))
return fetch(file.url, {
headers
}).then(res => res.arrayBuffer()).then(buf => Buffer.from(buf))
}
}
}
Expand Down

0 comments on commit ffee728

Please sign in to comment.