dom96 / jester

A sinatra-like web framework for Nim.
MIT License
1.56k stars 120 forks source link

Allow using both setHeader and resp w/ headers #294

Closed iffy closed 2 years ago

iffy commented 2 years ago

Currently making a request of a handler like this will only include the Content-Type header. This change makes it so that the foo and bar headers are added to the response as well.

  get "/manyheaders":
    setHeader(responseHeaders, "foo", "foo")
    setHeader(responseHeaders, "bar", "bar")
    resp Http200, {"Content-Type": "text/plain"}, "result"
iffy commented 2 years ago

Oops; this includes the code from https://github.com/dom96/jester/pull/267 as well. I can remake this PR if you'd like.

dom96 commented 2 years ago

Yeah, please split it if you can.

dom96 commented 2 years ago

Any news on this? :)

iffy commented 2 years ago

I'll wait for #275 and then remake this when I can get some time

dom96 commented 2 years ago

Friendly ping

iffy commented 2 years ago

I've submitted #300 to do the minimal change.