I am replying with a csv and also want to set the header=present option.
My knowledge of the http headers spec only goes so far but I think the result I need is text/csv; charset=utf-8; header=present;
Now when I reply with reply(csv).type('text/csv; header=present;'); I get "text/csv; header=present;, charset=utf-8" as a result (due to https://github.com/hapijs/hapi/blob/master/lib/transmit.js#L496)
Am I doing something wrong or should I add the charset myself (which feels like a hack) like so:
var response = reply(csv);
response.type(`text/csv; charset=${response.settings.charset}; header=present;`);
I am replying with a csv and also want to set the
header=presentoption.My knowledge of the http headers spec only goes so far but I think the result I need is
text/csv; charset=utf-8; header=present;Now when I reply with
reply(csv).type('text/csv; header=present;');I get"text/csv; header=present;, charset=utf-8"as a result (due to https://github.com/hapijs/hapi/blob/master/lib/transmit.js#L496)Am I doing something wrong or should I add the charset myself (which feels like a hack) like so: