Skip to content

new Response(blob).blob() should preserve type of the blob #607

@Gozala

Description

@Gozala

From what I can tell Response ignores type field of the blob (assuming it's constructed with blob) causing that information to be lost.

I would expect implementation to match behavior in browsers which is:

var blob = new Blob(['# Hi'], {type:"text/markdown"})

var response = new Response(blob)

response.headers.get('content-type') // "text/markdown"

(await response.blob()).type // "text/markdown"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions