Closed MilesMcBain closed 2 years ago
I found this example in the doco for response headers:
app$get("/hello", \(req, res){ res$header("Content-Type", "something") res$send("Using {ambiorix}!") })
The problem is that send() has a default for the headers arg: content_html() which will replace the custom Content-Type header something with text/html.
send()
headers
content_html()
Content-Type
something
text/html
Yes, I just noticed that looking at your previous issue. Pushed a fix.
Closing because this should be fixed in dev, feel free to reopen if it does not suit.
I found this example in the doco for response headers:
The problem is that
send()
has a default for theheaders
arg:content_html()
which will replace the customContent-Type
headersomething
withtext/html
.