New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bbc/http-transport

Package Overview
Dependencies
Maintainers
6
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbc/http-transport - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

lib/request.js
'use strict';
const DEFAULT_TIMEOUT = 1000;
const DEFAULT_TIMEOUT = 2000;

@@ -5,0 +5,0 @@ class Request {

{
"name": "@bbc/http-transport",
"version": "0.0.2",
"version": "0.0.3",
"description": "A flexible, modular REST client built for ease-of-use and resilience.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -360,2 +360,19 @@ const _ = require('lodash');

describe('timeout', () => {
it('sets the a timeout', () => {
nock.cleanAll();
api.get('/')
.socketDelay(1000)
.reply(200, simpleResponseBody);
const client = HttpTransport.createClient();
const response = client
.get(url)
.timeout(20)
.asBody();
return assertFailure(response, 'Request failed for GET http://www.example.com/: ESOCKETTIMEDOUT');
});
});
describe('plugins', () => {

@@ -495,19 +512,2 @@ it('supports a per request plugin', () => {

describe('timeout', () => {
it('sets the a timeout', () => {
nock.cleanAll();
api.get('/')
.socketDelay(1000)
.reply(200, simpleResponseBody);
const client = HttpTransport.createClient();
const response = client
.get(url)
.timeout(20)
.asBody();
return assertFailure(response, 'Request failed for GET http://www.example.com/: ESOCKETTIMEDOUT');
});
});
describe('logging', () => {

@@ -514,0 +514,0 @@ it('logs each request at info level when a logger is passed in', () => {

@@ -162,3 +162,3 @@ const assert = require('chai').assert;

api.get('/')
.socketDelay(1500)
.socketDelay(2500)
.reply(200, simpleResponseBody);

@@ -165,0 +165,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc