
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
A lightweight React hook wrapper around Axios with interceptors, auth, retry, and cancellation support.
AxiosX is a tiny React hook library for smart Axios requests with built-in:
status
, isLoading
, data
, error
npm install axiosx-dev axios react
import { init, useGet, usePost } from 'axiosx-dev';
// 1️⃣ Initialize once (e.g. in App.tsx)
init({
baseURL: 'https://api.example.com',
withAuth: true,
tokenKey: 'token',
maxRetries: 2,
retryDelay: 500,
on401: (err) => console.warn('Not authorized!', err),
});
// 2️⃣ Use inside a component
const { get, isLoading, data, error, cancelRequest } = useGet();
get('/users');
if (isLoading) console.log('Loading...');
if (error) console.log(error);
Hook | HTTP Method | Description |
---|---|---|
useGet | GET | Performs a GET request. |
usePost | POST | Performs a POST request. |
usePut | PUT | Performs a PUT request. |
useDelete | DELETE | Performs a DELETE request. |
usePatch | PATCH | Performs a PATCH request. |
useHead | HEAD | Performs a HEAD request. |
useOptions | OPTIONS | Performs an OPTIONS request. |
useGet
const { get, data, isLoading, status } = useGet();
useEffect(() => {
get('/users');
}, []);
usePost
const { post, data } = usePost();
post('/users', { name: 'John' });
Option | Type | Description |
---|---|---|
baseURL | string | Base URL for the Axios instance. |
timeout | number | Request timeout in milliseconds. |
headers | Record<string, string> | Custom headers to attach to every request. |
withAuth | boolean | Whether to add an Authorization header with a Bearer token. |
tokenKey | string | Key name in localStorage to read the token from. |
getToken | `() => string | null` |
on401 | (error: any) => void | Callback for handling 401 Unauthorized errors. |
onError | (error: any) => void | Global error handler callback for failed requests. |
maxRetries | number | Number of retry attempts for failed requests. |
retryDelay | number | Delay in ms between retry attempts. |
👉 Full Docs: https://axiosx-dev-docs.vercel.app (free Vercel subdomain)
MIT License.
FAQs
A lightweight React hook wrapper around Axios with interceptors, auth, retry, and cancellation support.
The npm package axiosx-dev receives a total of 0 weekly downloads. As such, axiosx-dev popularity was classified as not popular.
We found that axiosx-dev demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.