Comments (10)
Let's leave it as it is and this issue open, and maybe we'll do that if there is a need.
from fastify.
I claim there is definitely a need for this. As a concrete example, I am attempting to use it in fastify-caching
to access this.cache
so I can store an indicator that the resource can be served from the user's cache:
instance.addHook('onResponse', function (res, next) {
if (!res.hasHeader('etag')) return next()
this.cache.set(res.getHeader('etag'), true, 1000, next)
})
from fastify.
definitely 👍 . I think we should work on a PR after #330 lands.
from fastify.
Is there anyone familiar with how this works that is willing to start the PR now that #330 is merged? cc: @fastify/fastify
from fastify.
Should be easy, here a start:
from fastify.
I created a PR #408
from fastify.
I created a new one #414
from fastify.
It'd be really great if you simply pulled in upstream changes to an existing PR to resolve conflicts in the future.
from fastify.
For me it was easier to create a new one instead to merge the changes. I can take care about this in future.
from fastify.
Fixed in #414
from fastify.
Related Issues (20)
- querystring with property of type number fails HOT 7
- onError hook is called before errorHandler when error is thrown in onRequest hook HOT 7
- Approval Request for Future State Proposal HOT 20
- Expose .writeEarlyHints()
- Logger methods are not bound to this HOT 4
- Whole API breaks when passing non-async function to fastify.register HOT 3
- Documentation and example of webhook signature check (through rawBody) HOT 1
- req.headers or req.query null in a 404 handler HOT 6
- Update reply.then and fastify.then types to use branded types to please typescript-eslint HOT 5
- hasRoute not working properly HOT 7
- Serverless Firebase Functions (v2) Issue: "... failed to start and listen on the port defined provided by the PORT=8080 ..." HOT 2
- import/require fastify module is incredibly slow > 300 ms HOT 3
- Custom format for ajv gets overwritten by ajv-formats HOT 4
- Plugin: Generate endpoints based on file names on a directory. HOT 16
- custom error handler not breaking encapsulation using fastify-plugin HOT 1
- Broken type inferrence with auxilliary hook handlers HOT 2
- listen() registers a callback even when listen() fails, calling the callback twice - once when it fails and again if it succeeds in a later call HOT 5
- Only automatically run workflows when a member approved them or if the PR is created by a member HOT 2
- app.close only triggers when a new request comes, resulting in 503 error HOT 7
- Missing cookie field in headers of upgrade websocket request HOT 2
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.