Comments (7)
I can do it, if it is possible.
from undici.
Can you provide an
Minimum Reproducible Example that outlines the behaviour that is leading to the failures?
from undici.
for example:
API CALL:
import { request, pipeline } from 'undici'; await request('https://jsonplaceholder.typicode.com/comments', { method: 'GET', query: { id: 1, postId: 1, date: '12-10-2024T12:12:40' } })
EXPECTED URL GENERATED:
https://jsonplaceholder.typicode.com/comments?id=1&postId=1&date=12-10-2024T12:12:40
WHAT DEBUG MODE SHOWS:
UNDICI 13726: connecting to jsonplaceholder.typicode.com using https:undefined UNDICI 13726: connected to jsonplaceholder.typicode.com using https:h1 UNDICI 13726: sending request to GET https://jsonplaceholder.typicode.com//comments?id=1&postId=1&date=12-10-2024T12%3A12%3A40 UNDICI 13726: received response to GET https://jsonplaceholder.typicode.com//comments?id=1&postId=1&date=12-10-2024T12%3A12%3A40 - HTTP 200 UNDICI 13726: trailers received from GET https://jsonplaceholder.typicode.com//comments?id=1&postId=1&date=12-10-2024T12%3A12%3A40
HOW TO RUN:
NODE_DEBUG=undici node client.js
as you see it is encoded, this example will work but some server rest implementation (which I would call them bad designed) they don't accept encodedURIComponent in the query string.
from undici.
If you build the whole url yourself and don't use query
you should already be able to do this
from undici.
Yes I know, but I would prefer to not, when the library is doing it, I was wondering if there could be an option that could be passed to not encode the url?
from undici.
Maybe we should consider to pass a queryparser as an option?
from undici.
I was wondering if there could be an option that could be passed to not encode the url?
I don't think we want to maintain special code for bad behaving servers. You will need to do this "hack" in user space.
from undici.
Related Issues (20)
- Does not set TLS `servername` to the value of the `Host` header HOT 9
- Significant Slowdown in Requests When Using ProxyAgent HOT 4
- inconsistent setDate(0) behaviour between windows and linux HOT 1
- Nightly tests are failing HOT 6
- `UND_ERR_CONNECT_TIMEOUT` errors thrown when there is CPU intensive code on the event loop HOT 4
- Expose "Content-Encoding" handling publicly HOT 11
- Update automated release scripts to release from the v6.x branch
- Missing `6.19.4` tag/github release? HOT 1
- DELETED HOT 6
- `fetch` hangs indefinitely during second request to a certain webpage when using HTTP/2 HOT 4
- `undici.fetch` does not implement `body.dump()` as similar to `undici.request` (`Uncaught TypeError: response.body.dump is not a function`) HOT 1
- ERR_TLS_CERT_ALTNAME_INVALID error when using the proxy support (ProxyAgent) HOT 1
- react-scripts build is failing with TS1005 for balanced-pool.d.ts type HOT 5
- Can't use Undici with Brightdata proxy (error 407) HOT 1
- MockAgent not compatible with ProxyAgent,EnvHttpProxyAgent,RetryAgent HOT 1
- I do not receive set-cookie in response.headers.getSetCookie() HOT 5
- Missing bytes() mixin in response.body from request method HOT 1
- how to use maxRedirections in fetch api HOT 1
- WebSocket Data Transfer Slows Down After Node.js 16.14.2 Release
- code error HOT 1
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.