Socket
Book a DemoInstallSign in
Socket

balancing-request

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balancing-request

An extension to request that creates a balancing URL request stream.

0.1.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

#Balancing Request

An extension of request that takes a set of balancing URL routes and creates a suitable request object based upon a path. Its primary role is as a remote interface dependency of ol-proxy.

##Usage

To create an instance of the request generator, you must first instantiate it by passing in a set of routes and also an optional route type object that is used to perform the balancing computation.

var balancingRequest = require('balancing-request');
var routes = [
  'http://example.com',
  'http://example.org'
];
var streamGenerator = balancingRequest(routes);
var stream = streamGenerator('/sample.jpg');

##Route Types

By default, Balancing Request uses a route type that randomises the URL but you can specify a round robin (balancingUrl.routeTypes.ROUND_ROBIN) route type or create your own custom route type and pass it in as the second parameter when creating your stream generator.

For further information, see connrs/balancing-url

Keywords

url

FAQs

Package last updated on 13 Apr 2013

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.