Class RestRequest
- All Implemented Interfaces:
- jakarta.servlet.http.HttpServletRequest,- jakarta.servlet.ServletRequest
   The RestRequest object is an extension of the 
   
The primary methods on this class are:
- RestRequest- Methods for accessing the request content:
- Methods for accessing HTTP parts:
      - containsFormParam(String)
- containsHeader(String)
- containsQueryParam(String)
- getHeader(Class)
- getHeader(String)
- getHeaders()
- getFormParam(Class)
- getFormParam(String)
- getFormParams()
- getPathParam(Class)
- getPathParam(String)
- getPathParams()
- getPathRemainder()
- getQueryParam(Class)
- getQueryParam(String)
- getQueryParams()
- getQueryString()
 
- Methods for localization:
- Methods for accessing static files:
- Methods for assertions:
- Other:
      - getAttribute(String)
- getAttributes()
- getAuthorityPath()
- getBeanSession()
- getCharset()
- getConfig()
- getContext()
- getContextPath()
- getHttpServletRequest()
- getMethod()
- getOpContext()
- getOperationSwagger()
- getPartParserSession()
- getPartSerializerSession()
- getPathInfo()
- getProtocolVersion()
- getRequest(Class)
- getRequestLine()
- getRequestURI()
- getRequestURL()
- getServletPath()
- getSession()
- getSwagger()
- getUriContext()
- getUriResolver()
- isDebug()
- isPlainText()
- isUserInRole(String)
- setAttribute(String,Object)
- setCharset(Charset)
- setDebug()
- setException(Throwable)
- setNoTrace()
 
 
See Also:
- 
Field SummaryFields inherited from interface jakarta.servlet.http.HttpServletRequestBASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
- 
Method SummaryModifier and TypeMethodDescriptionProvides the ability to perform fluent-style assertions on the response character encoding.Returns a fluent assertion for the request content.assertFormParam(String name) Returns a fluent assertion for the specified form parameter.assertHeader(String name) Returns a fluent assertion for the specified header.assertQueryParam(String name) Returns a fluent assertion for the specified query parameter.Returns an assertion on the request line returned bygetRequestLine().booleancontainsFormParam(String name) Returnstrue if this request contains the specified header.booleancontainsHeader(String name) Returnstrue if this request contains the specified header.booleancontainsQueryParam(String name) Returnstrue if this request contains the specified header.getAttribute(String name) Returns the request attribute with the specified name.Request attributes.Returns the URI authority portion of the request.Returns theBeanSessionassociated with this request.Returns the charset specified on theContent-Type header, or"UTF-8" if not specified.Config file associated with the resource.Request content.Returns the resource context handling the request.Returns the portion of the request URI that indicates the context of the request.<T> Optional<T>getFormParam(Class<T> type) Returns the request form-data parameter of the specified type.getFormParam(String name) Shortcut for callinggetFormData().getString(name) .Form-data.<T> Optional<T>Returns the request header of the specified type.getHeaderParam(String name) Returns the last header with a specified name of this message.Request headers.jakarta.servlet.http.HttpServletRequestReturns the wrapped servlet request.jakarta.servlet.ServletInputStreamReturns the HTTP content content as anInputStream.Returns the preferred Locale that the client will accept content in, based on the Accept-Language header.getMessage(String key, Object... args) Shortcut method for callinggetMessages()andMessages.getString(String,Object...).Returns the resource bundle for the request locale.Returns the HTTP method of this request.Returns access to the innerRestOpContextof this method.Returns the swagger for the Java method invoked.Returns the part serializer associated with this request.Returns the part serializer session for this request.<T> Optional<T>getPathParam(Class<T> type) Returns the request path parameter of the specified type.getPathParam(String name) Shortcut for callinggetPathParams().get( .name )Path parameters.Shortcut for callinggetPathParams().getRemainder() .Returns the protocol version from the request line of this request.<T> Optional<T>getQueryParam(Class<T> type) Returns the request query parameter of the specified type.getQueryParam(String name) Shortcut for callinggetRequestQuery().getLast( .name )Query parameters.Returns the HTTP content content as aReader.<T> TgetRequest(Class<T> c) Creates a proxy interface to retrieve HTTP parts of this request as a proxy bean.<T> TSame asgetRequest(Class)but used on pre-instantiatedRequestBeanMetaobjects.Returns the request line of this request.Returns the part of this request's URL that calls the servlet.Returns the static files registered on the REST resource context object.Returns the localized swagger associated with the resource.Returns theTime-Zone header value on the request if there is one.Returns the URI for this request.Returns the URI context of the request.getUriResolver(UriResolution resolution, UriRelativity relativity) Returns a URI resolver that can be used to convert URIs to absolute or root-relative form.Request-level variable resolver session.booleanisDebug()Returnstrue if debug mode is enabled.booleanReturnstrue if&plainText=true was specified as a URL parameter.voidsetAttribute(String name, Object value) Sets a request attribute.voidsetCharset(Charset value) Sets the charset to expect on the request content.setDebug()Shortcut for callingsetDebug( .true )Sets the"Debug" attribute to the specified boolean.Sets the"Exception" attribute to the specified throwable.Shortcut for callingsetNoTrace( .true )Sets the"NoTrace" attribute to the specified boolean.toString()Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapperauthenticate, changeSessionId, getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradeMethods inherited from class jakarta.servlet.ServletRequestWrappergetAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getLocalAddr, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setCharacterEncoding, setCharacterEncoding, setRequest, startAsync, startAsyncMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.servlet.ServletRequestgetAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getLocalAddr, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setCharacterEncoding, setCharacterEncoding, startAsync, startAsync
- 
Method Details- 
getRequestLineReturns the request line of this request.- Returns:
- The request line of this request.
 
- 
getProtocolVersionReturns the protocol version from the request line of this request.- Returns:
- The protocol version from the request line of this request.
 
- 
assertRequestLineReturns an assertion on the request line returned bygetRequestLine().Example:// Validates the request content contains "foo". request .assertRequestLine().protocol().minor().is(1);- Returns:
- A new assertion object.
 
- 
assertContentReturns a fluent assertion for the request content.Example:// Validates the request content contains "foo". request .assertContent().asString().is("foo" );- Returns:
- A new fluent assertion on the content, never null .
 
- 
assertHeaderReturns a fluent assertion for the specified header.Example:// Validates the content type is JSON. request .assertHeader("Content-Type" ).asString().is("application/json" );- Parameters:
- name- The header name.
- Returns:
- A new fluent assertion on the parameter, never null .
 
- 
assertQueryParamReturns a fluent assertion for the specified query parameter.Example:// Validates the content type is JSON. request .assertQueryParam("foo" ).asString().contains("bar" );- Parameters:
- name- The query parameter name.
- Returns:
- A new fluent assertion on the parameter, never null .
 
- 
assertFormParamReturns a fluent assertion for the specified form parameter.Example:// Validates the content type is JSON. request .assertFormParam("foo" ).asString().contains("bar" );- Parameters:
- name- The query parameter name.
- Returns:
- A new fluent assertion on the parameter, never null .
 
- 
getHeadersRequest headers.Returns a RequestHeadersobject that encapsulates access to HTTP headers on the request.Example:@RestPost (...)public Object myMethod(RestRequestreq ) {// Get access to headers. RequestHeadersheaders =req .getRequestHeaders();// Add a default value. headers .addDefault("ETag" ,DEFAULT_UUID );// Get a header value as a POJO. UUID etag =headers .get("ETag" ).as(UUID.class ).orElse(null );// Get a standard header. Optional<CacheControl> =headers .getCacheControl(); }Notes:- This object is modifiable.
- Values are converted from strings using the registered part parser on the resource class.
- 
      The RequestHeadersobject can also be passed as a parameter on the method.
- 
      The @Headerannotation can be used to access individual header values.
 See Also:- Returns:
- The headers on this request.
   
 Nevernull .
 
- 
getHeaderParamReturns the last header with a specified name of this message.If there is more than one matching header in the message the last element of getHeaders(String) is returned.
 If there is no matching header in the message, an empty request header object is returned.Example:// Gets a header and throws a BadRequest if it doesn't exist. request .getHeader("Foo" ) .assertValue().exists() .get();- Parameters:
- name- The header name.
- Returns:
- The request header object, never null .
 
- 
containsHeaderReturnstrue if this request contains the specified header.- Parameters:
- name- The header name.
- Returns:
- true if this request contains the specified header.
 
- 
assertCharsetProvides the ability to perform fluent-style assertions on the response character encoding.Examples:// Validates that the response content charset is UTF-8. request .assertCharset().is("utf-8" );- Returns:
- A new fluent assertion object.
- Throws:
- BasicHttpException- If REST call failed.
 
- 
setCharsetSets the charset to expect on the request content.- Parameters:
- value- The new value to use for the request content.
 
- 
getCharsetReturns the charset specified on theContent-Type header, or"UTF-8" if not specified.- Returns:
- The charset to use to decode the request content.
 
- 
getLocaleReturns the preferred Locale that the client will accept content in, based on the Accept-Language header.If the client request doesn't provide an Accept-Language header, this method returns the default locale for the server.- Specified by:
- getLocalein interface- jakarta.servlet.ServletRequest
- Overrides:
- getLocalein class- jakarta.servlet.ServletRequestWrapper
- Returns:
- The preferred Locale that the client will accept content in.  Never null .
 
- 
getHeaderReturns the request header of the specified type.Type must have a name specified via the Headerannotation and a public constructor that takes in eithervalue orname,value as strings.Typically any of the following: - Accept
- AcceptCharset
- AcceptEncoding
- AcceptLanguage
- AcceptRanges
- Authorization
- CacheControl
- ClientVersion
- Connection
- ContentDisposition
- ContentEncoding
- ContentLength
- ContentType
- Date
- Debug
- Expect
- Forwarded
- From
- Host
- IfMatch
- IfModifiedSince
- IfNoneMatch
- IfRange
- IfUnmodifiedSince
- MaxForwards
- NoTrace
- Origin
- Pragma
- ProxyAuthorization
- Range
- Referer
- TE
- Thrown
- Upgrade
- UserAgent
- Warning
 - Type Parameters:
- T- The bean type to create.
- Parameters:
- type- The bean type to create.
- Returns:
- The parsed header on the request, never null .
 
- 
getTimeZoneReturns theTime-Zone header value on the request if there is one.Example: "GMT" .- Returns:
- The parsed header on the request, never null .
 
- 
getAttributesRequest attributes.Returns a RequestAttributesobject that encapsulates access to attributes on the request.Example:@RestPost (...)public Object myMethod(RestRequestreq ) {// Get access to attributes. RequestAttributesattributes =req .getAttributes();// Get a header value as a POJO. UUIDetag =attributes .get("ETag" , UUID.class ); }Notes:- This object is modifiable.
- Values are converted from strings using the registered part parser on the resource class.
- 
      The RequestAttributesobject can also be passed as a parameter on the method.
- 
      The @Attrannotation can be used to access individual attribute values.
 See Also:- Returns:
- The headers on this request.
   
 Nevernull .
 
- 
getAttributeReturns the request attribute with the specified name.- Specified by:
- getAttributein interface- jakarta.servlet.ServletRequest
- Overrides:
- getAttributein class- jakarta.servlet.ServletRequestWrapper
- Parameters:
- name- The attribute name.
- Returns:
- The attribute value, never null .
 
- 
setAttributeSets a request attribute.- Specified by:
- setAttributein interface- jakarta.servlet.ServletRequest
- Overrides:
- setAttributein class- jakarta.servlet.ServletRequestWrapper
- Parameters:
- name- The attribute name.
- value- The attribute value.
 
- 
getQueryParamsQuery parameters.Returns a RequestQueryParamsobject that encapsulates access to URL GET parameters.Similar to ServletRequest.getParameterMap()but only looks for query parameters in the URL and not form posts.Example:@RestGet (...)public void doGet(RestRequestreq ) {// Get access to query parameters on the URL. RequestQueryParamsquery =req .getQuery();// Get query parameters converted to various types. int p1/ =query .getInteger("p1" ).orElse(null ); Stringp2 =query .getString("p2" ).orElse(null ); UUIDp3 =query .get("p3" ).as(UUID.class ).orElse(null ); }Notes:- This object is modifiable.
 See Also:- Returns:
- The query parameters as a modifiable map.
   
 Nevernull .
 
- 
getQueryParamShortcut for callinggetRequestQuery().getLast( .name )- Parameters:
- name- The query parameter name.
- Returns:
- The query parameter, never null .
 
- 
getQueryParamReturns the request query parameter of the specified type.Type must have a name specified via the Queryannotation and a public constructor that takes in eithervalue orname,value as strings.- Type Parameters:
- T- The bean type to create.
- Parameters:
- type- The bean type to create.
- Returns:
- The parsed query parameter on the request, never null .
 
- 
containsQueryParamReturnstrue if this request contains the specified header.- Parameters:
- name- The header name.
- Returns:
- true if this request contains the specified header.
 
- 
getFormParamsForm-data.Returns a RequestFormParamsobject that encapsulates access to form post parameters.Similar to ServletRequest.getParameterMap(), but only looks for form data in the HTTP content.Example:@RestPost (...)public void doPost(RestRequestreq ) {// Get access to parsed form data parameters. RequestFormParamsformParams =req .getFormParams();// Get form data parameters converted to various types. int p1 =formParams .get("p1" ).asInteger().orElse(0); Stringp2 =formParams .get("p2" ).asString().orElse(null ); UUIDp3 =formParams .get("p3" ).as(UUID.class ).orElse(null ); }Notes:- This object is modifiable.
- Values are converted from strings using the registered part parser on the resource class.
- 
      The RequestFormParamsobject can also be passed as a parameter on the method.
- 
      The @FormDAtaannotation can be used to access individual form data parameter values.
 See Also:- Returns:
- The URL-encoded form data from the request.
   
 Nevernull .
- Throws:
- InternalServerError- If query parameters could not be parsed.
- See Also:
 
- 
getFormParamShortcut for callinggetFormData().getString(name) .- Parameters:
- name- The form data parameter name.
- Returns:
- The form data parameter value, or null if not found.
 
- 
getFormParamReturns the request form-data parameter of the specified type.Type must have a name specified via the FormDataannotation and a public constructor that takes in eithervalue orname,value as strings.- Type Parameters:
- T- The bean type to create.
- Parameters:
- type- The bean type to create.
- Returns:
- The parsed form-data parameter on the request, never null .
 
- 
containsFormParamReturnstrue if this request contains the specified header.- Parameters:
- name- The header name.
- Returns:
- true if this request contains the specified header.
 
- 
getPathParamsPath parameters.Returns a RequestPathParamsobject that encapsulates access to URL path parameters.Example:@RestGet ("/{foo}/{bar}/{baz}/*" )public void doGet(RestRequestreq ) {// Get access to path data. RequestPathParamspathParams =req .getPathParams();// Example URL: /123/qux/true/quux int foo =pathParams .get("foo" ).asInteger().orElse(-1);// =123 Stringbar =pathParams .get("bar" ).orElse(null );// =qux boolean baz =pathParams .get("baz" ).asBoolean().orElse(false );// =true Stringremainder =pathParams .getRemainder().orElse(null );// =quux }Notes:- This object is modifiable.
 - Returns:
- The path parameters.
   
 Nevernull .
 
- 
getPathParamShortcut for callinggetPathParams().get( .name )- Parameters:
- name- The path parameter name.
- Returns:
- The path parameter, never null .
 
- 
getPathParamReturns the request path parameter of the specified type.Type must have a name specified via the Pathannotation and a public constructor that takes in eithervalue orname,value as strings.- Type Parameters:
- T- The bean type to create.
- Parameters:
- type- The bean type to create.
- Returns:
- The parsed form-data parameter on the request, never null .
 
- 
getPathRemainderShortcut for callinggetPathParams().getRemainder() .- Returns:
- The path remainder value, never null .
 
- 
getContentRequest content.Returns a RequestContentobject that encapsulates access to the HTTP request content.Example:@RestPost (...)public void doPost(RestRequestreq ) {// Convert content to a linked list of Person objects. List<Person>list =req .getContent().as(LinkedList.class , Person.class ); .. }Notes:- 
      The RequestContentobject can also be passed as a parameter on the method.
- 
      The @Contentannotation can be used to access the content as well.
 See Also:- Returns:
- The content of this HTTP request.
   
 Nevernull .
 
- 
      The 
- 
getReaderReturns the HTTP content content as aReader.If allowHeaderParamsinit parameter is true, then first looks for&content=xxxin the URL query string.Automatically handles GZipped input streams. This method is equivalent to calling getContent().getReader() .- Specified by:
- getReaderin interface- jakarta.servlet.ServletRequest
- Overrides:
- getReaderin class- jakarta.servlet.ServletRequestWrapper
- Returns:
- The HTTP content content as a Reader.
- Throws:
- IOException- If content could not be read.
 
- 
getInputStreamReturns the HTTP content content as anInputStream.Automatically handles GZipped input streams. This method is equivalent to calling getContent().getInputStream() .- Specified by:
- getInputStreamin interface- jakarta.servlet.ServletRequest
- Overrides:
- getInputStreamin class- jakarta.servlet.ServletRequestWrapper
- Returns:
- The negotiated input stream.
- Throws:
- IOException- If any error occurred while trying to get the input stream or wrap it in the GZIP wrapper.
 
- 
getContextPathReturns the portion of the request URI that indicates the context of the request.The context path always comes first in a request URI. The path starts with a "/" character but does not end with a"/" character. For servlets in the default (root) context, this method returns"" . The container does not decode this string.- Specified by:
- getContextPathin interface- jakarta.servlet.http.HttpServletRequest
- Overrides:
- getContextPathin class- jakarta.servlet.http.HttpServletRequestWrapper
- Returns:
- The context path, never null .
- See Also:
- 
- HttpServletRequest.getContextPath()
 
 
- 
getAuthorityPathReturns the URI authority portion of the request.- Returns:
- The URI authority portion of the request.
 
- 
getServletPathReturns the part of this request's URL that calls the servlet.This path starts with a "/" character and includes either the servlet name or a path to the servlet, but does not include any extra path information or a query string.- Specified by:
- getServletPathin interface- jakarta.servlet.http.HttpServletRequest
- Overrides:
- getServletPathin class- jakarta.servlet.http.HttpServletRequestWrapper
- Returns:
- The servlet path, never null .
- See Also:
- 
- HttpServletRequest.getServletPath()
 
 
- 
getUriContextReturns the URI context of the request.The URI context contains all the information about the URI of the request, such as the servlet URI, context path, etc... - Returns:
- The URI context of the request.
 
- 
getUriResolverReturns a URI resolver that can be used to convert URIs to absolute or root-relative form.- Parameters:
- resolution- The URI resolution rule.
- relativity- The relative URI relativity rule.
- Returns:
- The URI resolver for this request.
 
- 
getUriResolver- Returns:
- The URI resolver for this request.
 
- 
getUriReturns the URI for this request.Similar to HttpServletRequestWrapper.getRequestURI()but returns the value as aURI. It also gives you the capability to override the query parameters (e.g. add new query parameters to the existing URI).- Parameters:
- includeQuery- If- true include the query parameters on the request.
- addQueryParams- Augment the request URI with the specified query parameters.
- Returns:
- A new URI.
 
- 
getSwaggerReturns the localized swagger associated with the resource.A shortcut for calling getInfoProvider().getSwagger(request); Example:@RestGet public List<Tag> swaggerTags(RestRequestreq ) {return req .getSwagger().getTags(); }Notes:- 
      The Swaggerobject can also be passed as a parameter on the method.
 See Also:- Returns:
- The swagger associated with the resource.
   
 Nevernull .
 
- 
      The 
- 
getOperationSwaggerReturns the swagger for the Java method invoked.- Returns:
- The swagger for the Java method as an Optional. Nevernull .
 
- 
getPartParserSessionReturns the part serializer associated with this request.- Returns:
- The part serializer associated with this request.
 
- 
getMethodReturns the HTTP method of this request.If allowHeaderParams init parameter istrue , then first looks for&method=xxx in the URL query string.- Specified by:
- getMethodin interface- jakarta.servlet.http.HttpServletRequest
- Overrides:
- getMethodin class- jakarta.servlet.http.HttpServletRequestWrapper
- Returns:
- The HTTP method of this request.
 
- 
isPlainTextReturnstrue if&plainText=true was specified as a URL parameter.This indicates that the Content-Type of the output should always be set to"text/plain" to make it easy to render in a browser.This feature is useful for debugging. - Returns:
- true if- &plainText=truewas specified as a URL parameter
 
- 
getMessagesReturns the resource bundle for the request locale.Example:@RestGet public String hello(RestRequestreq ,@Query ("user" ) Stringuser ) {// Return a localized message. return req .getMessages().getString("hello.message" ,user ); }Notes:- 
      The Messagesobject can also be passed as a parameter on the method.
 See Also:- Returns:
- The resource bundle.
   
 Nevernull .
 
- 
      The 
- 
getMessageShortcut method for callinggetMessages()andMessages.getString(String,Object...).- Parameters:
- key- The message key.
- args- Optional- MessageFormat-style arguments.
- Returns:
- The localized message.
 
- 
getContextReturns the resource context handling the request.Can be used to access servlet-init parameters or annotations during requests, such as in calls to RestGuard.guard(RestRequest, RestResponse)..- Returns:
- The resource context handling the request.
 
- 
getOpContextReturns access to the innerRestOpContextof this method.- Returns:
- The RestOpContextof this method. May benull if method has not yet been found.
 
- 
getBeanSessionReturns theBeanSessionassociated with this request.- Returns:
- The request bean session.
 
- 
isDebugReturnstrue if debug mode is enabled. Debug mode is enabled by simply adding"?debug=true" to the query string or adding aDebug: true header on the request.- Returns:
- true if debug mode is enabled.
 
- 
setExceptionSets the"Exception" attribute to the specified throwable.This exception is used by CallLoggerfor logging purposes.- Parameters:
- t- The attribute value.
- Returns:
- This object.
 
- 
setNoTraceSets the"NoTrace" attribute to the specified boolean.This flag is used by CallLoggerand tells it not to log the current request.- Parameters:
- b- The attribute value.
- Returns:
- This object.
 
- 
setNoTraceShortcut for callingsetNoTrace( .true )- Returns:
- This object.
 
- 
setDebugSets the"Debug" attribute to the specified boolean.This flag is used by CallLoggerto help determine how a request should be logged.- Parameters:
- b- The attribute value.
- Returns:
- This object.
- Throws:
- IOException- If content could not be cached.
 
- 
setDebugShortcut for callingsetDebug( .true )- Returns:
- This object.
- Throws:
- IOException- If content could not be cached.
 
- 
getVarResolverSessionRequest-level variable resolver session.Used to resolve SVL variables in text. Example:@RestGet public String hello(RestRequestreq ) {// Get var resolver session. VarResolverSessionsession = getVarResolverSession();// Use it to construct a customized message from a query parameter. return session .resolve("Hello $RQ{user}!" ); }Notes:- 
      The VarResolverSessionobject can also be passed as a parameter on the method.
 See Also:- Returns:
- The variable resolver for this request.
 
- 
      The 
- 
getStaticFilesReturns the static files registered on the REST resource context object.Used to retrieve localized files to be served up as static files through the REST API. - Returns:
- This object.
 
- 
getConfigConfig file associated with the resource.Returns a config file with session-level variable resolution. The config file is identified via one of the following: Example:@RestGet (...)public void doGet(RestRequestreq ) {// Get config file. Configconfig =req .getConfig();// Get simple values from config file. int timeout =config .get("MyResource/timeout" ).asInteger().orElse(=10000);// Get complex values from config file. MyBeanbean =config .get("MyResource/myBean" ).as(MyBean.class ).orElse(null ); }Notes:- 
      The Configobject can also be passed as a parameter on the method.
 See Also:- Returns:
- The config file associated with the resource, or null if resource does not have a config file associated with it.
 
- 
      The 
- 
getRequestCreates a proxy interface to retrieve HTTP parts of this request as a proxy bean.Examples:@RestPost ("/mypath/{p1}/{p2}/*" )public void myMethod(@Request MyRequestrequestBean ) {...}public interface MyRequest {@Path // Path variable name inferred from getter. String getP1();@Path ("p2" ) String getX();@Path ("/*" ) String getRemainder();@Query String getQ1();// Schema-based query parameter: Pipe-delimited lists of comma-delimited lists of integers. @Query ( collectionFormat="pipes" items=@Items ( items=@SubItems ( collectionFormat="csv" type="integer" ) ) )int [][] getQ3();@Header ("*" ) Map<String,Object> getHeaders();- Type Parameters:
- T- The request bean interface to instantiate.
- Parameters:
- c- The request bean interface to instantiate.
- Returns:
- A new request bean proxy for this REST request.
 
- 
getRequestSame asgetRequest(Class)but used on pre-instantiatedRequestBeanMetaobjects.- Type Parameters:
- T- The request bean interface to instantiate.
- Parameters:
- rbm- The metadata about the request bean interface to create.
- Returns:
- A new request bean proxy for this REST request.
 
- 
getHttpServletRequestReturns the wrapped servlet request.- Returns:
- The wrapped servlet request.
 
- 
getPartSerializerSessionReturns the part serializer session for this request.- Returns:
- The part serializer session for this request.
 
- 
toString
 
-