New candidate JEP: 408: Simple Web Server
sormuras at gmail.com
Sun May 9 06:47:12 UTC 2021
Motivated by the summary of JEP 408, I finally wrote a small blog
about an in-memory http handler that I use for testing browsing-related
code via URL.open..., HttpClient, or other ways to read a resource.
The basic idea is to map a prepared response (http code, bytes, and
content-type) to a request path. For example:
"/index.html" -> "<html><body><h1>Index</h1></body></html>"
Perhaps, this path-asset(resource)-mapping abstraction is useful for
somebody else, too.
On Mon, Mar 29, 2021 at 9:16 PM <mark.reinhold at oracle.com> wrote:
> Summary: Provide a command-line tool to start a minimal web server
> that serves static files in the current directory. This low-threshold
> utility will be useful for prototyping, ad-hoc coding, and testing
> purposes, particularly in educational contexts.
> - Mark
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the net-dev