{
std::string someResponse;
return respondError(request, Mordor::HTTP::OK, someResponse);
}
respondError is a bit of a misnomer - it's for sending responses with
no body, or very simple bodies that don't need to stream (such as the
string in this example).
If you're generating rStr on the fly from a variable amount of data,
I'd recommend against that, since then you'll have to be able to hold
the entire response in memory. Instead, either write directly to
request->responseStream() (setting up a chunked encoding yourself),
wrap the generation of your response in a custom Stream class that
generates more with each call to read, or use a PipeStream, giving one
end to respondStream, and (in another fiber), writing the response
into the other end.
Cody