Skip to content

body conversion #210

Description

@jimmywarting

Haven't tested v2 if this works but i would like for this to work:
It currently doesn't in 1.x

stream = new Response('hi').body
str = await new Response(Uint8Array.from([97])).text() // a
stream = new Response(Uint8Array.from([97])).body // returns a Uint8array [97] (should return a stream)

Ideally every acceptable thing you put into Response should work with
arraybuffer() json() text() and .body

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions