shelf_ndjson_stream 0.1.0 copy "shelf_ndjson_stream: ^0.1.0" to clipboard
shelf_ndjson_stream: ^0.1.0 copied to clipboard

A wrapper for easily streaming ndjson responses from a shelf server.

shelf_ndjson_stream #

A wrapper for easily streaming ndjson responses from a shelf server.

  • Create an NdjsonStream object.
  • Return stream.response in a Shelf handler.
  • Add messages to it with stream.add().
  • Don't forget to call stream.close(), or the connection will stay open forever (or likely produce some strange behaviour).
1
likes
160
pub points
0%
popularity

Publisher

verified publisheralxbkr.xyz

A wrapper for easily streaming ndjson responses from a shelf server.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

shelf

More

Packages that depend on shelf_ndjson_stream