Package net.thevpc.nhttp.server.api
Interface NWebServerHttpContext
public interface NWebServerHttpContext
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsQueryParam(String queryParam) <T> Tnet.thevpc.nuts.web.NHttpMethodgetPath()getPathPart(int pos) String[]intgetQueryParam(String queryParam) net.thevpc.nuts.NSessionnet.thevpc.nuts.util.NOptional<NWebToken>getToken()net.thevpc.nuts.util.NOptional<NWebUser>getUser()booleanrequireMethod(net.thevpc.nuts.web.NHttpMethod... m) runWithUnsafe(net.thevpc.nuts.util.NUnsafeRunnable callable) voidsendBytes(byte[] bytes, net.thevpc.nuts.web.NHttpCode code, NWebResponseHeaders headers) voidvoidvoidvoidsendJson(Object ex, NWebResponseHeaders headers) voidsendJson(Object ex, net.thevpc.nuts.web.NHttpCode code, NWebResponseHeaders headers) voidsendPlainText(String ex, net.thevpc.nuts.web.NHttpCode code, NWebResponseHeaders headers) voidvoidsendXml(String value, net.thevpc.nuts.web.NHttpCode code, NWebResponseHeaders headers) void
-
Method Details
-
getFirstPath
String getFirstPath() -
isEmptyPath
boolean isEmptyPath() -
getPathSize
int getPathSize() -
getPathParts
String[] getPathParts() -
getPathPart
-
getSession
net.thevpc.nuts.NSession getSession() -
getBodyAs
-
getBodyAsString
String getBodyAsString() -
sendPlainText
-
sendXml
-
sendXml
-
sendJson
-
sendJson
-
sendJson
-
getPath
String getPath() -
sendError
-
sendError
-
sendBytes
-
getMethod
net.thevpc.nuts.web.NHttpMethod getMethod() -
requireAuth
NWebServerHttpContext requireAuth() -
trace
-
requireMethod
-
throwNoFound
NWebServerHttpContext throwNoFound() -
getPrincipal
NWebPrincipal getPrincipal() -
getUser
net.thevpc.nuts.util.NOptional<NWebUser> getUser() -
setUser
-
getToken
net.thevpc.nuts.util.NOptional<NWebToken> getToken() -
setToken
-
runWithUnsafe
- Throws:
Throwable
-
getQueryParams
-
getQueryParam
-
containsQueryParam
-