Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

jamiewest/sse_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Sent Events client package.

This package provides support for bi-directional communication through Server Sent Events and corresponding POST requests. It's platform-independent, and can be used on both the command-line and the browser.

Usage

A simple usage example:

import 'package:sse_client/sse_client.dart';

void main() {
  final sseClient = SseClient.connect(Uri.parse('http://localhost:5000/stream?channel=messages'));

  sseClient.stream.listen((String? event) {
    print(event);
  });                                   
}

About

Server Sent Events client package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages