Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

request-har-capture

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-har-capture

Wrapper for request module that saves all traffic as a HAR file, useful for auto mocking a client

latest
Source
npmnpm
Version
0.3.2
Version published
Maintainers
1
Created
Source

request-har-capture

Wrapper for request module that saves all traffic as a HAR file, useful for auto mocking a client

Build Status Coverage Status Dependency Status devDependency Status js-semistandard-style

Use this module as drop-in replacement for https://www.npmjs.com/package/request-promise

All traffic can be saved by calling

request.saveHar('traffic.har');

Collected traffic can be cleared by calling

request.clear();

This is especially useful for capturing all test traffic from your back-end test suite, for doing auto mocking in your front-end test suite. See this project for an example: https://github.com/larsthorup/http-auto-mock-demo

Blog post about this technique: http://www.zealake.com/2015/01/05/unit-test-your-service-integration-layer/

Keywords

http

FAQs

Package last updated on 02 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts