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

Commit c9700f7

Browse files
authored
fix: use post for preloading (#3149)
As we don't accept get requests via the http api any more
1 parent 5fe9495 commit c9700f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/ipfs/src/core/runtime/preload-browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function preload (url, options) {
1717
options = options || {}
1818

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

2323
try {

packages/ipfs/src/core/runtime/preload-nodejs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = async function preload (url, options) {
1010
log(url)
1111
options = options || {}
1212

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

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

0 commit comments

Comments
 (0)