public class MediaHTTPD extends NanoHTTPD
NanoHTTPD.Response
HTTP_BADREQUEST, HTTP_FORBIDDEN, HTTP_INTERNALERROR, HTTP_NOTFOUND, HTTP_NOTIMPLEMENTED, HTTP_OK, HTTP_REDIRECT, MIME_DEFAULT_BINARY, MIME_HTML, MIME_PLAINTEXT, myFileDir
Constructor and Description |
---|
MediaHTTPD(int port) |
Modifier and Type | Method and Description |
---|---|
NanoHTTPD.Response |
serve(java.lang.String uri,
java.lang.String method,
java.util.Properties header,
java.util.Properties parms)
Override this to customize the server.
|
public MediaHTTPD(int port) throws java.io.IOException
java.io.IOException
public NanoHTTPD.Response serve(java.lang.String uri, java.lang.String method, java.util.Properties header, java.util.Properties parms)
NanoHTTPD
(By default, this delegates to serveFile() and allows directory listing.)
serve
in class NanoHTTPD
uri
- Percent-decoded URI without parameters, for example "/index.cgi"method
- "GET", "POST" etc.header
- Header entries, percent decodedparms
- Parsed, percent decoded parameters from URI and, in case of POST, data.