All Projects → paulirish → request-capture-har

paulirish / request-capture-har

Licence: MIT license
Wrapper for request module that saves all traffic as a HAR file.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to request-capture-har

izzyparser-ios
IzzyParser is an iOS library for serializing and deserializing JSON:API objects
Stars: ✭ 19 (-48.65%)
Mutual labels:  request
Human Activity Recognition
A new and computationally cheap method to perform human activity recognition using PoseNet and LSTM. Where we use PoseNet for Preprocessing and LSTM for understand the sequence.
Stars: ✭ 25 (-32.43%)
Mutual labels:  har
r2
A minimalist HTTP request routing helper for Go.
Stars: ✭ 32 (-13.51%)
Mutual labels:  request
hook-slinger
A generic service to send, retry, and manage webhooks.
Stars: ✭ 88 (+137.84%)
Mutual labels:  request
json-caching-proxy
Node caching HTTP proxy built on top of express-http-proxy. Persists requests and responses to an in-memory HAR-like data structure based on HAR1.2 . Caches JSON content-type responses by default with the ability to cache an entire site; including content-types describing images. Useful for testing front end code, mocking api, and saving the cac…
Stars: ✭ 31 (-16.22%)
Mutual labels:  har
templates
基于开源新版签到框架站发布的公共har模板库,仅供示例
Stars: ✭ 306 (+727.03%)
Mutual labels:  har
python-sonarqube-api
Python wrapper for the SonarQube (Community Edition and Enterprise Edition) and SonarCloud API.
Stars: ✭ 107 (+189.19%)
Mutual labels:  request
centra
Core Node.js HTTP client
Stars: ✭ 52 (+40.54%)
Mutual labels:  request
http2-client
Transparently make http request to both http1 / http2 server.
Stars: ✭ 31 (-16.22%)
Mutual labels:  request
vue-methods-promise
Let Vue methods support return Promise
Stars: ✭ 35 (-5.41%)
Mutual labels:  request
hermes-js
Universal action dispatcher for JavaScript apps
Stars: ✭ 15 (-59.46%)
Mutual labels:  request
legible
the cleanest way to make http requests in js / node
Stars: ✭ 49 (+32.43%)
Mutual labels:  request
net
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.
Stars: ✭ 16 (-56.76%)
Mutual labels:  request
haralyzer
A Framework For Using HAR Files To Analyze Web Pages
Stars: ✭ 89 (+140.54%)
Mutual labels:  har
node-fetch-har
Generate HAR entries for requests made with node-fetch
Stars: ✭ 23 (-37.84%)
Mutual labels:  har
aws-signature-version-4
The buttoned-up and boring, but deeply analyzed, implementation of SigV4 in .NET
Stars: ✭ 57 (+54.05%)
Mutual labels:  request
cmn-utils
公共函数&请求封装
Stars: ✭ 43 (+16.22%)
Mutual labels:  request
servie
Standard, framework-agnostic HTTP interfaces for JavaScript servers and clients
Stars: ✭ 39 (+5.41%)
Mutual labels:  request
har-server
Serve responses from a HAR file.
Stars: ✭ 31 (-16.22%)
Mutual labels:  har
http
Aplus Framework HTTP Library
Stars: ✭ 113 (+205.41%)
Mutual labels:  request

request-capture-har

Wrapper for request module that saves all network traffic data as a HAR file.

Build Status NPM request-capture-har package

Compatibility

request >= 2.81.0 recommended, as it has much more detailed timings via timingPhases.

request >= v2.75.0 required, at a minimum.

Usage

// wrap around your request module
const RCH = require('request-capture-har');
const requestCaptureHar = new RCH(require('request'));

// ...
// `requestCaptureHar.request` is your `request` module's API.
// ...
requestCaptureHar.request(uri, options, callback);

// Save HAR file to disk
requestCaptureHar.saveHar(`network-waterfall_${new Date().toISOString()}.har`);

// You can also clear any collected traffic
requestCaptureHar.clear();

This repo is a fork of larsthorup's node-request-har-capture. Instead of monkey-patching request-promise, the API allows you to pass in the general request module. We also added better support for transfer timings.

image Above is a HAR captured by using request-capture-har from within npm to capture an npm install.

Background

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/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].