exozonedev / wsabi-client Goto Github PK
View Code? Open in Web Editor NEWA lightweight client for the hapi websocket layer, wsabi.
A lightweight client for the hapi websocket layer, wsabi.
As beam now uses 204 status codes
https://github.com/ExoZoneDev/wsabi-client/blob/master/ts/src/client.ts#L52
Will reject on some requests.
When you send a request to a server the client should have an inbuilt timeout for not getting a response back. Either using Promises
or a setTimeout
. Example being if you send a request using an uppercase on the method or a URL which the API / site takes a while to resolve. (Basically sites that don't force a timeout) the Promise sits for ages w/o timing out.
Obviously the application can do the timeout's is self but in theory the module should be also handling timeouts / dead responses from the live socket.
I'd like to be able to catch error messages that come from the server on a call to .live
I was making a silly mistake, (omitting one set of :'s from a slug) on call to .live
wsabi.live(`user:000update`).subscribe(....)
And there's currently no way to catch or even investigate a failed promise from a call to .live.
https://github.com/ExoZoneDev/wsabi-client/blob/master/src/client.js#L100 doesn't expose the promise back to the implementation.
The same problem doesn't occur with .put,.get etc as the request promises are returned.
I'm not sure on the best way to resolve this without breaking existing API so i'm opening an issue. For now I've got a rejection handler and some console.logs manually inserted within my projects node_modules/
not ideal.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.