Skip to content
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

Merged
merged 1 commit into from
Dec 25, 2015

Conversation

shashiranjan84
Copy link
Contributor

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

if json_body ~= nil then

-- remove key:value to body
for _, name, value in iter(conf.remove.json) do
Copy link
Member

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?

@subnetmarco subnetmarco changed the title [fix/response-transformer] fix for isssue #393 [fix/response-transformer] fix for issue #393 Dec 23, 2015
return stringy.startswith(content_type, APPLICATION_JSON)
end
return false
end
Copy link
Member

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.

@shashiranjan84 shashiranjan84 force-pushed the fix/response-transformer branch 3 times, most recently from 1dadc3c to a03eb07 Compare December 24, 2015 03:28
@thibaultcha
Copy link
Member

LGTM too

@thibaultcha thibaultcha added pr/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release) and removed pr/status/needs review labels Dec 24, 2015
@shashiranjan84 shashiranjan84 added pr/status/needs review and removed pr/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release) labels Dec 24, 2015
@shashiranjan84
Copy link
Contributor Author

@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
@thibaultcha
Copy link
Member

Should have been a new commit to distinguish it

thibaultcha added a commit that referenced this pull request Dec 25, 2015
[fix/response-transformer] fix for issue #393
@thibaultcha thibaultcha merged commit 0247d24 into next Dec 25, 2015
@thibaultcha thibaultcha deleted the fix/response-transformer branch December 25, 2015 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants