nodejs / nodejs/undici

Is `fetch` API planned to support unix domain socket?

Open
#2,970 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

fetch
Dominant language
JavaScript
Stars
7.7k
Forks
880
Avg merge
2d 16h
Merged PRs (30d)
68

Description

Many Node.js applications leverage Unix Domain Sockets for inter-process communication (IPC), providing a more efficient and secure way to communicate compared to traditional network sockets. Supporting the socketPath option in undici's fetch API could significantly benefit applications that rely on IPC, especially those dealing with microservices or local server communication.

it would be incredibly useful to have fetch requests directed to a Unix Domain Socket. This could look something like:

const response = await fetch('unix:///path/to/socket.sock/request-path', {
  method: 'GET'
  // additional options
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Begin by reviewing undici's fetch API and the proposed socketPath and unix:// request shape; done would mean an agreed implementation that supports fetch requests over Unix domain sockets, with corresponding validation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.