Open tarcieri opened 11 years ago
Reel's API to send streaming responses using chunked transfer encoding is still a bit wonky:
# Sending transfer_encoding chunked without a body enables streaming mode request.respond :ok, :transfer_encoding => :chunked # This will send individual chunks request << "Hello" request << "World" request.finish_response # Write trailer and reset connection to header mode
It'd probably make more sense if we wrote to the response object instead of the request object:
response = Reel::Response.new(:ok, :transfer_encoding => :chunked) request.respond response response << "Hello" response << "World" response.finish
Reel's API to send streaming responses using chunked transfer encoding is still a bit wonky:
It'd probably make more sense if we wrote to the response object instead of the request object: