Menu

Introducing Fetrix – An Advanced XMLHttpRequest Client for JavaScript
📰

Introducing Fetrix – An Advanced XMLHttpRequest Client for JavaScript

DEV Community: opensource·Naxrul Ahmed·about 3 hours ago
#wfogutH3
Reading 0:00
15s threshold

I've built Fetrix , a lightweight and extensible HTTP client designed for modern JavaScript and TypeScript applications.

While Fetch API is great, I wanted an HTTP client that provides more control over requests, progress tracking, retries, and interceptors without adding external dependencies.

That's why I built Fetrix on top of XMLHttpRequest .

✨ What makes Fetrix different?

Smart query parameter injection

Automatic JSON body serialization

Upload and download progress tracking

Request and response interceptors

Automatic retry on network failures and timeouts

Request deduplication

AbortController support

Configurable timeout

Custom HTTP status validation

Multiple response types (JSON, Blob, Text, ArrayBuffer, Document, Response)

FormData and multipart support

Zero external dependencies

💻 Simple example

import fetrix from 'fetrix' ;

const users = await fetrix ( 'https://api.example.com/users' , { method : 'GET' , params : { limit : 10 , offset : 0 } , responseType : 'json' } ) ;

console .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.