Registry / http-networking / axios-proxy-fix

axios-proxy-fix

JSON →
library0.16.3jsnpmunverified

A fork of axios (Promise based HTTP client for browser and Node.js) with proxy support fixes. v0.16.3 is a legacy version based on axios 0.16.x, which is no longer actively maintained. Note that the original axios is at v1.x and has breaking changes from v0.x. This fork is not the official axios and may have diverged. Use official axios for modern projects.

npm install axios-proxy-fix
INSTALL
IMPORT
SIG · AXIOS-PROXY-FIX
A
axios-proxy-fix
http-networkingjavascriptv0.16.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

axios
import axios from 'axios-proxy-fix'
const axios = require('axios-proxy-fix')
For CommonJS use require(). For ESM use default import.
AxiosInstance
import type { AxiosInstance } from 'axios-proxy-fix'
import { AxiosInstance } from 'axios-proxy-fix'
This is a type export, use 'import type' with TypeScript.
AxiosResponse
import type { AxiosResponse } from 'axios-proxy-fix'
import AxiosResponse from 'axios-proxy-fix'
AxiosResponse is a named type, not a default export.

Basic GET/POST requests with axios-proxy-fix (v0.16.x style). Note that error handling uses catch().

import axios from 'axios-proxy-fix'; // Make a GET request axios.get('/user?ID=12345') .then(function (response) { console.log(response.data); }) .catch(function (error) { console.log(error); }); // POST request axios.post('/user', { firstName: 'Fred', lastName: 'Flintstone' }) .then(response => console.log(response)) .catch(error => console.log(error)); // Using axios config axios({ method: 'get', url: 'https://api.example.com/data', params: { key: 'value' } }).then(response => { console.log(response.data); });
Debug
Known issues
gotchaThis is a fork of the original axios, not maintained by axios team. Proxy fixes may not be in official axios. Use at your own risk.
fix
Consider using official axios with manual proxy configuration, or use http-proxy-agent and https-proxy-agent.
affects: >=0.16.0
breakingaxios v0.x to v1.x has breaking changes: request/response interceptors signature, cancellation with AbortController, etc. This fork is based on v0.16.x.
fix
Do not mix axios v1.x and v0.x. Use consistent version.
affects: >=1.0.0
deprecatedaxios-proxy-fix v0.16.3 is outdated. No further updates likely. Consider migrating to official axios v1.x.
fix
Run: npm uninstall axios-proxy-fix && npm install axios@latest
affects: =0.16.3
Errors
Common errors & fixes
Cannot read property 'protocol' of undefined
Proxy configuration missing or incorrectly set in axios options.
fix
Ensure proxy object has host and port properties: proxy: { host: 'localhost', port: 8080 }
TypeError: adapter is not a function
Mismatch between axios version and adapter (e.g., in React Native or testing).
fix
Use official axios and set adapter explicitly if needed: adapter: require('axios/lib/adapters/http')
Uncaught TypeError: Cannot read properties of null (reading 'status')
Response object is null, often due to network error (e.g., DNS failure) not handled.
fix
Add error handling that checks error.response: if (error.response) { ... } else { ... }
Upgrade
Version history
0.16.3latest on npm
Audit
Dependencies
follow-redirectsrequiredHTTP redirect following in Node.js
is-bufferrequiredBuffer type checking helper (Node.js)
Agent activity
18 hits · last 30 days
node
12
OpenAI (training)
1
Resources
axios-proxy-fix — npm install axios-proxy-fix · libregistry