Motivated by the summary of JEP 408, I finally wrote a small blog[1] 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. Cheers, Christian [1]: https://sormuras.github.io/blog/2021-05-09-in-memory-http-server-handler On Mon, Mar 29, 2021 at 9:16 PM <mark.reinh...@oracle.com> wrote: > https://openjdk.java.net/jeps/408 > > 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 >