Pass through Reader response body type to Deno's HTTP server
See original GitHub issueDeno’s current Response
interface allows Reader
as the body type.
/**
* Interface of HTTP server response.
* If body is a Reader, response would be chunked.
* If body is a string, it would be UTF-8 encoded by default.
*/
export interface Response {
status?: number;
headers?: Headers;
body?: Uint8Array | Reader | string;
}
This would be convenient to have in oak since, for example, dejs renders its templates to a Reader
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
A comprehensive guide to HTTP servers in Deno
Response building including setting cookies, headers, different types of bodies (URL encoded, JSON, form data, text, binary, etc.) Saving & ...
Read more >Response | /http/server.ts | std@0.68.0
Interface of HTTP server response. If body is a Reader, response would be chunked. If body is a string, it would be UTF-8...
Read more >Deno oak server post body and reponse
"value" on the body is also a promise, try awaiting it: const reqBody = await (await ctx.request.body({ type: 'json' })).value;.
Read more >Streaming requests with the fetch API - Chrome Developers
This shows how you can stream data from the user to the server, and send data back that can be processed ... const...
Read more >Second adventure in Deno land 🦕 | learning as we go
If body is a Reader, response would be chunked. If body is a string, it would be UTF-8 encoded by default ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dbohdan I think you need to do a
--reload
. Using your example works for me.I am/do. I just wanted to try to get as many bug fixes into before cutting a version.