nanohttpd: refactor: remove IHTTPSession.execute()

This commit is contained in:
Haowei Wen 2020-08-26 18:33:12 +08:00
parent 5ca213f5cc
commit 854b0284bd
No known key found for this signature in database
GPG key ID: 5BC167F73EA558E4
2 changed files with 18 additions and 11 deletions

View file

@ -58,22 +58,30 @@ import java.util.Map;
*/
public interface IHTTPSession {
void execute() throws IOException;
Map<String, String> getHeaders();
InputStream getInputStream() throws IOException;
InetSocketAddress getRemoteAddress();
String getMethod();
Map<String, List<String>> getParameters();
String getQueryParameterString();
/**
* @return the path part of the URL.
*/
String getUri();
InetSocketAddress getRemoteAddress();
/**
* @return raw query string, null if no query exists
*/
String getQueryParameterString();
/**
* @return decoded query parameters
*/
Map<String, List<String>> getParameters();
Map<String, String> getHeaders();
/**
* @return request body, null if the request does not have a payload
*/
InputStream getInputStream() throws IOException;
}

View file

@ -257,7 +257,6 @@ public abstract class NanoHTTPD {
}
@SuppressWarnings("resource")
@Override
public void execute() throws IOException {
Response r = null;
try {