Welcome the channel on the development of Cro, a set of libraries for building reactive distributed systems, lovingly crafted to take advantage of all the Raku Programming Language has to offer (cro.services). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
07:02 perlmaros left, perlmaros joined 11:13 Xliff joined
Xliff I want to send a file from a Cro router. How can I set the proper filename and content-type on such a response? 11:13
I'm currently doing the following: $response.append-header('Content-disposition', 'atttachment: report.xslx' ); content 'application/vnd.ms-excel', ...; 11:14
And while that works, it's not setting the downloaded content to "report.xlsx" 11:15
12:15 Xliff left 12:56 kawaii left 12:57 kawaii joined 14:35 japhb left, japhb joined 16:24 thowe joined
thowe I don't know if I just need help navigating docs or what, but when I create the example stub hello, the service.raku file has Cro::Service seems to require env variables HELLO_HOST and HELLO_PORT. It's not getting them from my env or from the Docker file, so where is it getting those that it doesn't just throw an exception? I don't see anything about these env variables in the docs. How are they being set? 16:27
was just following docs here: cro.services/docs/intro/getstarted 16:28
jnthn If you were following them, you'd have done `cro run` after `cro stub`, and the runner provides the env vars :) 18:25
18:35 Xliff joined
Xliff \o again! 18:35
I want to send a file from a Cro router. How can I set the proper filename and content-type on such a response?
I'm currently doing the following: $response.append-header('Content-Disposition', 'atttachment: report.xslx' ); content 'application/vnd.ms-excel', ...;
And while that works, it's not setting the downloaded content to "report.xlsx" 18:36
Any ideas?
Um... er.... oh 18:43
This worked.
$response.append-header('Content-Disposition', 'atttachment; filename=report.xslx' );
19:07 jgaz left
thowe jnthn: cool; where are the env vars provided by cro run documented? 20:10
also, how do you do that markup you did around cro run and cro stub? (I'm running convos) 20:11
jnthn Backticks, as in Markdown 21:56
For docs see cro.services/docs/cro-yml
And cro.services/docs/cro-tool 21:57
Xliff: Is it really meant to be a colon after "attachment"? I have a hazy memory it should be a semi...
Ah, and with `filename=` apparently, see developer.mozilla.org/en-US/docs/W...isposition 21:58