Skip to content

Instantly share code, notes, and snippets.

@weihungchin
Last active May 3, 2021 13:16
Show Gist options
  • Save weihungchin/a18f61ec6f82ed2a9aac60bbb244c922 to your computer and use it in GitHub Desktop.
Save weihungchin/a18f61ec6f82ed2a9aac60bbb244c922 to your computer and use it in GitHub Desktop.
import { tap } from 'rxjs/operators';
import { webSocket } from 'rxjs/webSocket';
const wsSubjec2$ = webSocket({
url: 'wss://www.gasnow.org/ws/gasprice',
});
wsSubject$
.pipe(
tap((data) => console.log(data)),
)
.subscribe();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment