Support compression
See original GitHub issueHello I really love marblejs!! I want to use it on my project and also contribute it if I can. BTW is there a talk channel for marblejs? like spectrum, gitter, discord
I wanna compress response(gzip) like express-compression.
Middleware looks like only update req
but not res
// effects.combiner.ts
export const combineMiddlewares = <T, U>
(...effects: Effect<T, T, U>[]) =>
(input$: Observable<T>, client: U, meta: EffectMetadata): Observable<T> =>
effects.reduce((i$, effect) => effect(i$, client, meta!), input$);
So user can not add compress feature by add a compression middleware.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Support Compression - Jobst USA
Just like medical compression stockings, support stockings can help to counteract venous symptoms in combating venous problems such as edema.
Read more >20-30mmHg Firm Support Compression Socks & Stockings
20-30mm Hg is categorized as firm support. It builds upon the benefits of the 8-15mmHg and 15-20mmHg compressions and assists in the treatment...
Read more >Compression Socks Gifts at Support Plus
Our Stockings come in four levels of medically correct compression for better circulation and relief from achy legs. Mild Support - for tired...
Read more >Support & Compression Levels - FUTURO
Provides therapeutic compression to help relieve moderate-severe symptoms of chronic tired, aching legs, leg pain, varicosities, post-sclerotherapy, and edema.
Read more >compression socks - Amazon.com
Sheer Compression Stockings for Women, 8-15 mmHg Support, Light Denier, Knee High, Closed Toe. 4.3 out of 5 stars 199. Save 12%.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for kind words! There is already a Gitter channel for Marble.js but looks like nobody wants to talk ¯_(ツ)_/¯
For response compression, you can make use of output$ interceptor where you can attach a compression logic, which for example can be piped to the response.
This is only a dummy idea of how it can be implemented. More details you can find here.
The idea for this improvement will look like this:
So in general,
output$
effect will have an ability to get an initiator which will contain a contextual object (eg.HttpRequest
), so the developer will be able to grab all relevant information when needed from Effect metadata. The same pattern is used insideErrorEffect
where you can grab from meta theerror
object.