Good morning, i need some help, i´m noob for vibe.d. My problem is in download csv file, set headers Content-Type and Content-Disposition, also writing in the body text I needed, but at the time of the post, not download any files. Deputy code:
void postdownload(scope HTTPServerRequest req, scope HTTPServerResponse res)
{
Json j = ...;
auto response = serialize!JsonSerializer(this.makeRequest(anythingUrl, "POST", serialize!JsonSerializer(j)));
res.headers["Content-Disposition"] = "attachment; filename=Reporte.txt";
res.headers["Cache-Control"] = "no-cache";
//res.headers["Expires"] = "-1";
res.headers["Content-Description"] = "File Transfer";
//res.headers["Content-Encoding"] = "UTF-8";
//res.headers["Pragma"] = "no-cache";
string csvFile = response.rbody.toString();
res.writeBody(csvFile,"text/csv");
}