Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

fix: use post for preloading #3149

Merged
merged 1 commit into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/runtime/preload-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function preload (url, options) {
options = options || {}

return httpQueue.add(async () => {
const res = await HTTP.get(url, { signal: options.signal })
const res = await HTTP.post(url, { signal: options.signal })
const reader = res.body.getReader()

try {
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/runtime/preload-nodejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async function preload (url, options) {
log(url)
options = options || {}

const res = await HTTP.get(url, { signal: options.signal })
const res = await HTTP.post(url, { signal: options.signal })

for await (const _ of res.body) { // eslint-disable-line no-unused-vars
// Read to completion but do not cache
Expand Down