-
Notifications
You must be signed in to change notification settings - Fork 0
Feature
poteto edited this page Nov 21, 2024
·
4 revisions
It requires >=0.19.0.
You can get or generate RequestId from context.
- You can log easily.
func handler(ctx poteto.Context) error {
reqId := ctx.RequestId()
your_logger(reqId)
}- The Response will be include
X-Request-Id.
- Get from Context.store This makes faster if many time access. If you access to requestId in handler, You get from Context.store
- Get from Header
X-Request-Id. - Gen UUID@v4.
Router uses TrieTree. Node's key is split by "/".
ex) /user/profile/:id -> (user) => (profile) => (:id)
- TrieTree
https://medium.com/@gwt200407/data-structure-trie-tree-ea5c9be38a74
Cached context for the second and subsequent requests.
it requires >=0.14.0.