Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News Netflix Announces Polly.JS HTTP Interaction Library

Netflix Announces Polly.JS HTTP Interaction Library


Netflix recently announced the release of Polly.JS, an open source library for recording, replaying and stubbing HTTP interactions.

Polly leverages native browser APIs to mock requests and responses with minimal configuration, providing developers with a mechanism to manage HTTP requests.

The Netflix team found that keeping fixtures and factories in parity with APIs is challenging, which led to the creation of Polly. Polly records and maintains server responses in a flexible manner. For example, it is possible to record and replay HTTP interactions during test runs to verify application accuracy, as well as capturing requests and responses to simulate changes to application state.

Polly supports both Fetch and XHR requests and provides test helpers for Mocha and QUnit test helpers. Developers may intercept, modify, and attach events, as well as apply changes to accelerate or decelerate request response times.

Recording of HTTP interactions with Polly may be saved to disk or local storage within a browser in HTTP Archive (HAR) format.

Browser support is currently for Evergreen browsers (most recent releases of major browsers). Support for Internet Explorer 11 is under active development based on community feedback.

The Polly team is also working to make the library work in an isomorphic manner to support other testing frameworks, such as Jest and Intern. Testing is currently limited to work within web browsers.

Polly.JS is available under the Apache 2 license. Contributions are encouraged via GitHub. Prospective contributors are encouraged to read the contributing guidelines.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.