Comments (5)
in the meantime, you can use Agent with fetch
import { fetch, Agent } from 'undici'
const resp = await fetch('http://localhost/version', {
dispatcher: new Agent({
connect: {
socketPath: '/var/run/docker.sock'
}
})
})
console.log(await resp.text())
as a sidenote this is actually how people seem to fetch unix sockets in deno
from undici.
I think supporting this should be easy enough and possibly just having the request pass the validation check.
@KhafraDev wdyt?
from undici.
Unlikely. We are only doing web spec stuff. If you are doing backend development why are you using fetch? Use undici.request
and then you can use unix sockets.
from undici.
Unlikely. We are only doing web spec stuff. If you are doing backend development why are you using fetch? Use
undici.request
and then you can use unix sockets.
Because the fetch API is familiar to most developers, we also use the same API as the web on the server side.
from undici.
I'm not opposed to it, as long as it doesn't add an option to fetch
from undici.
Related Issues (20)
- bug: spreading `Headers` object has breaking behavior in versions between Node 20.12 and 20.13 HOT 9
- Limit the maximum numbers of open sockets HOT 2
- interceptors: move `throwOnError` to interceptor HOT 2
- interceptors: move signal handling to interceptor
- Support for custom proxy auth schemes HOT 7
- Nightly tests are failing HOT 2
- do not encode with encodeURIComponent if query with method GET passed. HOT 4
- Retry Handler Fails When Request Has a Body HOT 5
- autobahn workflow is always 1 commit behind HOT 1
- Nightly tests are failing HOT 3
- (regression?) timeouts while reading a body no longer abort with a TimeoutError HOT 2
- Body timeout not working HOT 5
- Retrieve the URL when errored HOT 1
- SocketError: other side closed (with repro example) HOT 1
- Fetch failed with UND_ERR_CONNECT_TIMEOUT undici error on Next.js serverless function HOT 1
- 'interceptors' export doesn't work like in the docs HOT 1
- Nightly tests are failing HOT 4
- publish autobahn test results on the docs site HOT 7
- Nightly tests are failing HOT 2
- Improve support for pre-shared sessions (PSK) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undici.