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

Make using custom headers easier/nicer #94

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

victormihalache
Copy link

With this commit you can go from having to write:

req.send(Http200, getTime().format("yyyy-MM-dd"), "Access-Control-Allow-Origin: *")

to writing:

req.send(getTime().format("yyyy-MM-dd"), "Access-Control-Allow-Origin: *")

It's a small change, but given we already have something similar for sending a body with a custom code—very handy for when a custom response code is needed—to me it only makes sense we have one for custom headers, something that gets set far more often.

Sorry if this may be out of scope, I just found it a personal annoyance having to write Http200, every time just because I needed a custom header.

Lastly, I do not know wether or not this should have the {. inline .} pragma or not.

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.

1 participant