-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix/response-transformer] fix for issue #393 #822
Conversation
56e9740
to
a585fce
Compare
if json_body ~= nil then | ||
|
||
-- remove key:value to body | ||
for _, name, value in iter(conf.remove.json) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value
is never used, isn't the linter complaining?
return stringy.startswith(content_type, APPLICATION_JSON) | ||
end | ||
return false | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should probably be implemented the same way as the one in body_transformer.
1dadc3c
to
a03eb07
Compare
LGTM too |
a03eb07
to
f606d4f
Compare
@thibaultcha PR need to be reviewed as I notice a bug in my code. I have made the change and added test. |
Now add will only add header/json if it does not exist, config `append` added to support adding new value to existing header/json. If header does not exist, a new one will be added. config `replace added to replace the value of existing header/json with new value
f606d4f
to
7b7d388
Compare
Should have been a new commit to distinguish it |
[fix/response-transformer] fix for issue #393
Now add will only add header/json if it does not exist, config
append
added to support adding new value to existing header/json. If header does not exist, a new one will be added. config `replace added to replace the value of existing header/json with new value