Open victormihalache opened 10 months ago
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.
body
code
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.
Http200,
Lastly, I do not know wether or not this should have the {. inline .} pragma or not.
{. inline .}
With this commit you can go from having to write:
to writing:
It's a small change, but given we already have something similar for sending a
body
with a customcode
—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.