Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.
This repository was archived by the owner on Jul 22, 2020. It is now read-only.

FetchRequest should have body functions (text(), json() etc) too #3

Description

@alastaircoote

In browsers, you can run text(), json() and so on onRequest, the same as you can Response, because they both inherit from Body: https://developer.mozilla.org/en-US/docs/Web/API/Request

We should do the same too, to allow workers to parse content sent in (even factoring in the caveats of #1). Things to do:

  • abstract out these functions from FetchResponse into a new FetchBody class, have FetchResponse inherit from it
  • have FetchRequest also inherit from it, and read in the request body as an InputStream.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions