Package fi.iki.elonen
Interface NanoHTTPD.IHTTPSession
-
- All Known Implementing Classes:
NanoHTTPD.HTTPSession
- Enclosing class:
- NanoHTTPD
public static interface NanoHTTPD.IHTTPSessionHandles one session, i.e. parses the HTTP request and returns the response.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidexecute()NanoHTTPD.CookieHandlergetCookies()java.util.Map<java.lang.String,java.lang.String>getHeaders()java.io.InputStreamgetInputStream()NanoHTTPD.MethodgetMethod()java.util.Map<java.lang.String,java.util.List<java.lang.String>>getParameters()java.util.Map<java.lang.String,java.lang.String>getParms()Deprecated.usegetParameters()instead.java.lang.StringgetQueryParameterString()java.lang.StringgetRemoteHostName()Get the remote hostname of the requester.java.lang.StringgetRemoteIpAddress()Get the remote ip address of the requester.java.lang.StringgetUri()voidparseBody(java.util.Map<java.lang.String,java.lang.String> files)Adds the files in the request body to the files map.
-
-
-
Method Detail
-
execute
void execute() throws java.io.IOException- Throws:
java.io.IOException
-
getCookies
NanoHTTPD.CookieHandler getCookies()
-
getHeaders
java.util.Map<java.lang.String,java.lang.String> getHeaders()
-
getInputStream
java.io.InputStream getInputStream()
-
getMethod
NanoHTTPD.Method getMethod()
-
getParms
@Deprecated java.util.Map<java.lang.String,java.lang.String> getParms()
Deprecated.usegetParameters()instead.This method will only return the first value for a given parameter. You will want to use getParameters if you expect multiple values for a given key.
-
getParameters
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getParameters()
-
getQueryParameterString
java.lang.String getQueryParameterString()
-
getUri
java.lang.String getUri()
- Returns:
- the path part of the URL.
-
parseBody
void parseBody(java.util.Map<java.lang.String,java.lang.String> files) throws java.io.IOException, NanoHTTPD.ResponseExceptionAdds the files in the request body to the files map.- Parameters:
files- map to modify- Throws:
java.io.IOExceptionNanoHTTPD.ResponseException
-
getRemoteIpAddress
java.lang.String getRemoteIpAddress()
Get the remote ip address of the requester.- Returns:
- the IP address.
-
getRemoteHostName
java.lang.String getRemoteHostName()
Get the remote hostname of the requester.- Returns:
- the hostname.
-
-