Odoo GraphQL Subscription using Node, Express JS for Sample
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Anand Shukla 5269ec3c66 Initial Sample. 6 months ago
..
dist Initial Sample. 6 months ago
LICENSE Initial Sample. 6 months ago
README.md Initial Sample. 6 months ago
package.json Initial Sample. 6 months ago

README.md

response-iterator

Creates an async iterator for a variety of inputs in the browser and node. Supports fetch, node-fetch, cross-fetch, axios, got, undici.

Example 1

// import "isomorphic-fetch"; // node only
import responseIterator from 'response-iterator';

const res = await fetch('https://raw.githubusercontent.com/kmalakoff/response-iterator/master/package.json');

let data = '';
for await (const chunk of responseIterator(res)) {
  data += chunk;
}
console.log(JSON.parse(data).name); // "response-iterator"

Example 2

import crossFetch from 'cross-fetch';
import responseIterator from 'response-iterator';

const res = await crossFetch('https://raw.githubusercontent.com/kmalakoff/response-iterator/master/package.json');

let data = '';
for await (const chunk of responseIterator(res)) {
  data += chunk;
}
console.log(JSON.parse(data).name); // "response-iterator"

Documentation

API Docs