mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-12 14:17:48 +02:00
feat(http): add status code 101, 103 for null body (#2655)
This commit is contained in:
@@ -229,9 +229,9 @@ export async function fetch(
|
||||
rid
|
||||
})
|
||||
|
||||
// no body for 204, 205 and 304
|
||||
// see https://searchfox.org/mozilla-central/source/dom/fetch/Response.cpp#258
|
||||
const body = [204, 205, 304].includes(status)
|
||||
// no body for 101, 103, 204, 205 and 304
|
||||
// see https://fetch.spec.whatwg.org/#null-body-status
|
||||
const body = [101, 103, 204, 205, 304].includes(status)
|
||||
? null
|
||||
: new ReadableStream({
|
||||
start: (controller) => {
|
||||
|
||||
Reference in New Issue
Block a user