Comments (5)
I assume that res.stream is used for higher throughput. Maybe we should implement an option to select if res or stream is passed through.
This would empower others to get what they need.
from fastify-reply-from.
Given that we had a regression for 204 recently, could you include a reproduction for the 204 problem you are mentioning?
I'm not sure I understand your use case. I think your code would be easier to read and maintain if you just used undici.request directly to orchestrate your APIs?
from fastify-reply-from.
Hi, thanks for your inquiry.
Here is a repo that try to reproduce our use case : Swizz/reply-from-dummy
Because of a legacy codebase, we are still using node 14 and fastify v2 in production.
By running npm run start
, you will be provided a swagger interface at /docs
.
All routes are described in the readme, and more comments in the code will enlight you about what we are trying to achieve. The special routes /post/100
will mimic the 204
behavior.
We tried to use undici, but you did a great job on reply-from to relay directly headers such as authentication or request status for errored routes that saved us for a lot of headaches.
But we would totally understand if your are against such changes because opening to more features could add you maintenance on subjects your package was not intented for.
from fastify-reply-from.
I'm extremely surprised that the latest version of this module works with such an old version of Fastify.
Composing multiple endpoint into out is somewhat out of the one of @fastify/reply-from
. I'd recommend to use undici directly and forward the headers.
If you are using OpenAPI, you can check out the automated client we created in Platformatic. It has facilities to forward headers etc.
https://docs.platformatic.dev/docs/reference/client/introduction/#openapi
If you need professional help with the migration or anything similar, feel free to ping me via email, happy to have a chat.
from fastify-reply-from.
Related Issues (20)
- Support load balancing across multiple base urls.
- Suggestion: rewriteHeaders should take originalReq as argument HOT 2
- Request type in onResponse option HOT 3
- Allow disabling request logging HOT 4
- Docs (potentially code) and Typescript definition not in sync HOT 2
- [Undici] Stream body support HOT 3
- ChainAlert: npm package release (6.7.0) has no matching tag in this repo
- Rewrite body HOT 4
- make use of global agent
- Header encoding changes, leading to `ERR_INVALID_CHAR` HOT 16
- Host and other request headers are incorrectly modified on the original request, not just the forwarded request HOT 3
- retriesCount not defined in interface FastifyReplyFromHooks HOT 2
- Option to disable request timeout HOT 2
- FastifyError [FST_REPLY_FROM_INTERNAL_SERVER_ERROR]: Connect Timeout Error HOT 4
- Odd behaviour in unit tests in disable-request-logging.test.js
- support pool for http2Requests HOT 3
- Update Documentation for multipart and reply-from interaction HOT 2
- Undici Body Timeout Error crashes fastify server HOT 5
- False response errored messages HOT 5
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 fastify-reply-from.