Re: Vibe-D File Question

2020-09-12 Thread Selim Ozel via Digitalmars-d-learn
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

Re: Vibe-D File Question

2020-09-11 Thread James Blachly via Digitalmars-d-learn
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

Re: Vibe-D File Question

2020-09-11 Thread Daniel Kozak via Digitalmars-d-learn
On Fri, Sep 11, 2020 at 1:15 PM Daniel Kozak wrote: > On Fri, Sep 11, 2020 at 1:10 PM Selim Ozel via Digitalmars-d-learn < > digitalmars-d-learn@puremagic.com> wrote: > >> It seems like rejected-software forum is flooded with spam, so I >> decided to ask it here. Is there a way to generate a

Re: Vibe-D File Question

2020-09-11 Thread Daniel Kozak via Digitalmars-d-learn
On Fri, Sep 11, 2020 at 1:10 PM Selim Ozel via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > It seems like rejected-software forum is flooded with spam, so I > decided to ask it here. Is there a way to generate a file -csv > for example- on the back-end and serve it to the

Vibe-D File Question

2020-09-11 Thread Selim Ozel via Digitalmars-d-learn
It seems like rejected-software forum is flooded with spam, so I decided to ask it here. Is there a way to generate a file -csv for example- on the back-end and serve it to the front-end as a file. Serve static file [1] function does this for files saved on the disk. I want to be able to