[HN Gopher] Polly.js - Record, replay, and stub HTTP interactions
       ___________________________________________________________________
        
       Polly.js - Record, replay, and stub HTTP interactions
        
       Author : floriangosse
       Score  : 72 points
       Date   : 2024-01-08 11:49 UTC (11 hours ago)
        
 (HTM) web link (netflix.github.io)
 (TXT) w3m dump (netflix.github.io)
        
       | weka wrote:
       | What is surprising is that Netflix is pushing out JavaScript, and
       | not TypeScript, related projects in 2024.
        
         | open592 wrote:
         | They "pushed" out this project in 2018
         | 
         | https://github.com/Netflix/pollyjs/commit/281115d359ee0da5e0...
        
         | giancarlostoro wrote:
         | I'm pretty comfortable with JavaScript, Python and C#. You
         | would think I would love TypeScript, but I specifically mainly
         | use JS when its native to the browser, I hate the nightmare
         | that is maintaining JS tools and packages. I can understand why
         | someone might want to avoid the ceremony of setting up a JS
         | project and just use as much OOTB as possible.
        
         | teaearlgraycold wrote:
         | They are using tsc though. It's all type-checked. In my
         | experience using tsc on JavaScript files is a good experience.
         | But you don't get the full feature set.
        
       | kristo wrote:
       | What is the benefit of this over MSW (https://mswjs.io/)
        
         | rtcode_io wrote:
         | You can mock with service workers in real time and deploy them
         | globally as edge workers without ever leaving your browser or
         | learning non-standard APIs:
         | 
         | - <https://sw.rt.ht/?> (worker inside https://RTCode.io)
         | 
         | - https://sw.rt.ht/ (deployed to https://RTEdge.net)
         | 
         | Editor: Everything is real-time! Try editing things. (You can
         | intercept requests to other domains by using io:host=* on the
         | worker.)
         | 
         | Editor/Edge: This uses standard web platform APIs! In addition,
         | KV storage (in-editor/edge-deployed) is ready, object storage,
         | and more is in the works!
        
       | jadbox wrote:
       | Could I use this library to implement offline support for an API
       | (for example htmx requests)? I'm imagine I could capture requests
       | in the web worker to add in offline logic.
        
         | evanjrowley wrote:
         | The answer to your question is yes. Approximately 18 hours ago,
         | _Show HN: I made a HTMX Playground 100% in the browser_ [0] was
         | submitted, and Polly.js is a dependency.
         | 
         | [0] https://news.ycombinator.com/item?id=38906989
        
       | ChrisArchitect wrote:
       | (2018)
        
         | ChrisArchitect wrote:
         | Then: https://news.ycombinator.com/item?id=17308246
        
       ___________________________________________________________________
       (page generated 2024-01-08 23:01 UTC)