🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

axios-http2-adapter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-http2-adapter

`axios-http2-adapter` is a custom adapter designed to fill a gap in the current Axios ecosystem. Despite widespread demand, as evidenced by [axios issue #1175](https://github.com/axios/axios/issues/1175), Axios has yet to implement native HTTP/2 support.

1.0.3
latest
npm
Version published
Weekly downloads
6.8K
-2.19%
Maintainers
1
Weekly downloads
 
Created
Source

axios-http2-adapter

axios-http2-adapter is a custom adapter designed to fill a gap in the current Axios ecosystem. Despite widespread demand, as evidenced by axios issue #1175, Axios has yet to implement native HTTP/2 support. This library offers a seamless solution, integrating HTTP/2 capabilities into Axios via http2-wrapper.

Installation

npm install axios-http2-adapter

Usage

Basic usage:

const axios = require('axios');
const { createHTTP2Adapter } = require('axios-http2-adapter');

axios.defaults.adapter = createHTTP2Adapter();

Configuration:

const axios = require('axios');
const { createHTTP2Adapter } = require('axios-http2-adapter');
const http2 = require('http2-wrapper');

const adapterConfig = {
  agent: new http2.Agent({ /* options */ }),
  force: true // Force HTTP/2 without ALPN check - adapter will not check whether the endpoint supports http2 before the request
};

axios.defaults.adapter = createHTTP2Adapter(adapterConfig);

License

This project is licensed under the MIT License.

Acknowledgements

axios http2-wrapper

FAQs

Package last updated on 22 May 2025

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