GitPedia
Azure

Azure/fetch-event-source

A better API for making Event Source requests, with all the features of fetch()

5 Releases
Latest: 5y ago
v2.0.1Latest
vishwamvishwam·5y ago·April 25, 2021
GitHub

This release adds support for esmodule imports (see #4).

v2.0.0
vishwamvishwam·5y ago·December 25, 2020
GitHub

📋 Changed

  • The `id`, `event`, and `data` fields are now initialized to empty strings, per the spec (they were previously `undefined`)
  • The `onmessage` callback is now called for _all_ messages (it was previously triggered only for messages with a `data` field)
  • If a message contains multiple `data` fields, they will be concatenated together into a single string. For example, the following message:
  • ````
  • data: Foo
  • data:Bar
  • data
  • data: Baz
  • + 3 more

🗑️ Removed

  • The internal `parseStream` function has been removed. The parse implementation was previously based on async generators, which required a lot of supporting code in both the typescript-generated polyfill and the javascript engine. The new implementation is based on simple callbacks, which should be much faster.
v1.0.2
vishwamvishwam·5y ago·November 27, 2020
GitHub

📋 Changed

  • Updated examples in readme to fix typos, added more comments.
  • Changed `if` statements in parse.ts to test for specific values instead of truthy/falsy values.
v1.0.1
vishwamvishwam·5y ago·November 18, 2020
GitHub

📋 Changed

  • Changed the default onOpen validator to allow charset and boundary directives in the content-type (Fixes #1)
v1.0.0
vishwamvishwam·5y ago·November 18, 2020
GitHub

Initial release