Skip to content

Request should allow WritableStream as body #378

@jimmywarting

Description

@jimmywarting

Now we can get a readable stream from the response, which is cool! But i think it needs a complementary WriteableStream for the request as well. Imagine being able to post more then what can fit into the memory or were you simply just don't have everything you need to post.

let ws = new WritableStream
let encoder = new TextEncoder
let writer = ws.getWriter()

fetch('api/upload', {
    method: 'post',
    body: ws
})

let uint8array = encoder.encode('chunk')

writeStream.write(uint8array)
writeStream.close()

But i guess the WritableStream has to be implemented first ^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions