On Friday, 11 September 2020 at 13:03:16 UTC, James Blachly wrote:
On 9/11/20 7:28 AM, Daniel Kozak wrote:
void fun(HTTPServerRequest req, HTTPServerResponse res) nothrow
{
try
{
res.headers["Content-Disposition"] = "filename=\"muj.csv\"";
res.writeBody("some;csv;data", "text/csv");
}
catch (Exception e)
{}
}

Selim, note the Content-Disposition header in particular.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition

Thank you Daniel and James! The example works. It's exactly what I was asking for. I got the core idea with the Content Disposition article.

Reply via email to