Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js undici fetch data async

import { fetch } from "undici";

const data = {
  async *[Symbol.asyncIterator]() {
    yield "hello";
    yield "world";
  },
};

(async () => {
  await fetch("https://example.com", { body: data, method: 'POST' });
})();
Source by github.com #
 
PREVIOUS NEXT
Tagged: #js #undici #fetch #data #async
ADD COMMENT
Topic
Name
6+9 =