Replies: 1 comment
-
@laggu I certainly read your discussion and thought I responded to it; however, today I realized I missed to respond. I have captured my response here - #973 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to suggest some features about resty middleware.
give both resty.Request, resty.Response to parameter of middleware
currently, middleware only can have a resty.Request or a resty.Response as a parameter.
I know we don't have response before we send request.
but it's only a data type that we can make an empty or default value.
setting resty.Response and return by middleware
if we can have resty.Response on request middleware, we can change the resty.Response value directly
As resty.Response has already been set up, It's possible to return without error before sending request
I think this changing will make middleware more powerful
caching middleware will be a good example of it.
an empty response without error will be problematic so developer should be aware of it
but I think this bug would be easily catched by developer who use this feature.
example
Beta Was this translation helpful? Give feedback.
All reactions