`Body has already been consumed.` with `$fetch.raw`
Open
Nobody has claimed this yet.
documentation
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
const resp = await $fetch.raw("https://test.com/blob");
console.log(resp.blob()); // caused error
get Failed to execute 'blob' on 'Response': body stream already read
still can get data by resp._data
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the TypeScript example with $fetch.raw and resp.blob(), then trace how the raw response and _data are handled; done means resp.blob() no longer fails with a body-stream-already-read error while the reported data remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100