You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

fetch-http2

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-http2 - npm Package Compare versions

Comparing version

to
1.0.3

2

dist/http2.d.ts

@@ -17,5 +17,5 @@ /// <reference types="node" />

timeout?: number;
keepAlive?: number;
keepAlive?: number | boolean;
}
export declare function _fetch(url: URL, options?: _FetchOptions): Promise<_FetchResponse>;
export {};

@@ -10,3 +10,5 @@ "use strict";

// Find or create http client
const client = _httpClient(origin, { keepAlive: options?.keepAlive });
const client = _httpClient(origin, {
keepAlive: options?.keepAlive ?? 5000
});
// Build http request

@@ -51,4 +53,4 @@ const req = client.request({

// Send a ping every 5s to keep client alive
if (options?.keepAlive) {
timer = (0, node_timers_1.setInterval)(() => client.ping(noop), options.keepAlive);
if (typeof options?.keepAlive === 'number') {
timer = (0, node_timers_1.setInterval)(() => client.ping(noop), options.keepAlive).unref();
}

@@ -55,0 +57,0 @@ // Create function to destroy client

{
"name": "fetch-http2",
"version": "1.0.2",
"version": "1.0.3",
"description": "Native http2 fetch implementation for Node.js",

@@ -5,0 +5,0 @@ "author": "Andrew Barba <barba@hey.com>",

# fetch-http2
[![npm version](https://badge.fury.io/js/fetch-http2.svg)](https://badge.fury.io/js/fetch-http2)
[![Twitter](https://img.shields.io/badge/twitter-@andrew_barba-blue.svg?style=flat)](http://twitter.com/andrew_barba)
Native http2 `fetch` implementation for Node.js

@@ -4,0 +7,0 @@