1.0.13 • Published 15 days ago

vb-request v1.0.13

Weekly downloads
-
License
ISC
Repository
-
Last release
15 days ago

Info

  • This is the package used to balance the volume of requests from clients for your software.

Example

const vbrequest = require('vb-request');

const test = async () =>
{
    const response = await vbrequest.get('servers1', '/')
    console.log(response);
}

test();

const test2 = async () =>
{
    const response = await vbrequest.get('servers2', '/controllerName/methodName', {
        Headers: {
            'Content-Type': 'application/json',
            'Authorization': 'Bearer %token%' 
        },
        Query: {
            'param1': 'value1',
            'param2': 'value2'
        },
    })
    console.log(response);
}

test2();

Config

groups:
  servers1:
    server-choosing: 2
    servers:
      '1':
        url: http://google.com
        token: token
      '2':
        url: http://localhost:3001
        token: token
  servers2:
    server-choosing: 1
    servers:
      '1':
        url: http://localhost:3000
        token: token
      '2':
        url: http://localhost:3001
        token: token

Why?

1.0.13

15 days ago

1.0.12

15 days ago

1.0.11

1 month ago

1.0.10

1 month ago

1.0.9

1 month ago

1.0.8

1 month ago

1.0.7

1 month ago

1.0.6

1 month ago

1.0.5

1 month ago

1.0.4

1 month ago

1.0.3

1 month ago

1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

1 month ago