Skip to content

Support for JSON Blobs in formdata #14

Description

@fire2

Given the following simplified multipart request:

const object = Objects.assign({}, { name: 'test' });
const formData = new FormData();
formData.append("someJson", new Blob([JSON.stringify(object)], { type: 'application/json' }));
const request = new Request(url, {
  body: formData,
  method: 'POST',
  headers
});

when intercepting this request, formData["someJson"] is just 'blob'. It would be nice to get the object back if the part content type is application/json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions