Package org.apache.juneau.examples.rest
Class RequestEchoResource
java.lang.Object
org.apache.juneau.rest.servlet.RestObject
org.apache.juneau.rest.servlet.BasicRestObject
org.apache.juneau.examples.rest.RequestEchoResource
- All Implemented Interfaces:
BasicUniversalConfig
,DefaultConfig
,DefaultHtmlConfig
,BasicRestOperations
@Bean(on="HttpServletRequest",interfaceClass=jakarta.servlet.http.HttpServletRequest.class) @Bean(on="HttpSession",interfaceClass=jakarta.servlet.http.HttpSession.class) @Bean(on="ServletContext",interfaceClass=jakarta.servlet.ServletContext.class)
public class RequestEchoResource
extends BasicRestObject
Sample REST resource for echoing HttpServletRequests back to the browser.
See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.servlet.http.HttpServletRequest
doGet
(RestRequest req) [HTTP GET /echo/*] GET request handler.Methods inherited from class org.apache.juneau.rest.servlet.BasicRestObject
error, getFavIcon, getHtdoc, getStats, getSwagger
Methods inherited from class org.apache.juneau.rest.servlet.RestObject
doLog, getContext, getRequest, getResponse, log, log, setContext
-
Constructor Details
-
RequestEchoResource
public RequestEchoResource()
-
-
Method Details
-
doGet
[HTTP GET /echo/*] GET request handler.- Parameters:
req
- The HTTP servlet request.- Returns:
- The same request to serialize as the response.
-