Skip to content

Instantly share code, notes, and snippets.

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