fetch-request-body-to-async-iterator

Convert the body of a fetch request to an async iterator of bytes

Usage no npm install needed!

<script type="module">
  import fetchRequestBodyToAsyncIterator from 'https://cdn.skypack.dev/fetch-request-body-to-async-iterator';
</script>

README

fetch-request-body-to-async-terator

Convert the body of a fetch request to an async iterator of bytes

How it works

This module can covert various data types you can expect to have in the request body for fetch() calls into async iterators of Buffers.

These can then be converted into streams or whatever else your application needs.

Currently it supports:

Not supported

One thing that isn't yet supported but we'd love a PR for is the FormData object since it's not clear how it should be serlialized.