public interface NWebCallContext extends AutoCloseable
URI getRequestURI()
String getFirstPath()
boolean isEmptyPath()
int getPathSize()
String[] getPathParts()
String getPathPart(int pos)
<T> T getRequestBodyAs(Class<T> cl)
<T> T getRequestBodyAs(Class<T> cl, NContentType contentType)
String getRequestBodyAsString()
String getPath()
NWebHttpException wrapException(Throwable ex)
NWebCallContext setResponseContentType(String contentType)
NWebCallContext setErrorCode(NMsgCode errorCode)
NWebCallContext sendResponseHeaders()
OutputStream getResponseBody()
NHttpMethod getMethod()
NWebCallContext requireAuth()
NWebCallContext info(NMsg msg)
NWebCallContext error(NMsg msg)
NWebCallContext trace(NHttpLogMsg msg)
NWebCallContext requireMethod(NHttpMethod... m)
NWebCallContext throwNoFound()
NWebPrincipal getPrincipal()
NWebCallContext setUser(NWebUser user)
NWebCallContext setToken(NWebToken token)
NWebCallContext runWithUnsafe(NUnsafeRunnable callable) throws Throwable
Throwableboolean containsQueryParam(String queryParam)
NWebCallContext addResponseHeader(String name, String value)
NWebCallContext setResponseHeader(String name, String value)
NHttpCode getResponseCode()
NWebCallContext setResponseCode(NHttpCode responseCode)
Map<String,FormDataItem> getFormDataMap()
InputStream getRequestBody()
NOptional<FormDataItem> getFormData(String name)
boolean isMultipartRequest()
NWebCallContext setTextResponse(String value)
NWebCallContext setXmlResponse(String value)
NWebCallContext setJsonResponse(Object value)
NWebCallContext setBytesResponse(byte[] value)
NWebCallContext setFileResponse(NPath value)
NWebCallContext setErrorResponse(NMsgCode errorCode)
NWebCallContext sendResponse()
NWebCallContext setErrorResponse(NWebHttpException ex)
NWebCallContext setErrorResponse(Throwable ex)
void close()
close in interface AutoCloseableboolean isResponseSent()
NLoginResult authenticateWithCredentials(NAuthenticationRequest authenticationRequest)
NLoginResult authenticateWithRefreshToken(String refreshToken)
void initializeConfig()
NWebContext getWebContext()
Copyright © 2026 vpc open source initiative. All rights reserved.