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

Add header support for middleware #1244

Merged
merged 1 commit into from
Jan 17, 2016

Conversation

namusyaka
Copy link
Contributor

ref #1069
This adds the header method for activating it in our middleware.
Could you review the pull request?

val ? @header[key.to_s] = val : @header.delete(key.to_s)
else
@header
module HeaderMethods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in a separate file probably. And I don't love the name "HeaderMethods", maybe just "Headers"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'll fix it.

@namusyaka namusyaka force-pushed the add-header-support branch 2 times, most recently from 120c087 to f21e75a Compare January 15, 2016 03:44
@namusyaka
Copy link
Contributor Author

Fixed and force pushed.
Thanks for your review.

response
end

def reflect_headers(response)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be private?

Maybe rename it to merge_headers?

@dblock
Copy link
Member

dblock commented Jan 15, 2016

Sorry more minor comments, please.

Extract #headers from DSL::InsideRoute to DSL::Headers
@namusyaka
Copy link
Contributor Author

Thanks for polite reviewing! Pushed.

dblock added a commit that referenced this pull request Jan 17, 2016
@dblock dblock merged commit 73dfad6 into ruby-grape:master Jan 17, 2016
@dblock
Copy link
Member

dblock commented Jan 17, 2016

Merged, thanks!

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