@RestResource(path="/echo",title="Request echo service",description="Echos the current HttpServletRequest object back to the browser.",htmldoc=@HtmlDoc(widgets={ContentTypeMenuItem.class,ThemeMenuItem.class},navlinks={"up: request:/..","options: servlet:/?method=OPTIONS","$W{ContentTypeMenuItem}","$W{ThemeMenuItem}","source: $C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"},aside={"<div style=\'max-width:400px;min-width:200px\' class=\'text\'>","\t<p>Shows how even arbitrary POJOs such as <code>HttpServletRequest</code> can be serialized by the framework.</p>","\t<p>Also shows how to specify serializer properties, filters, and swaps at the servlet level to control how POJOs are serialized.</p>","\t<p>Also provides an example of how to use the Traversable and Queryable APIs.</p>","</div>"},nowrap="false"),properties={@Property(name="BeanTraverseContext.maxDepth.i",value="5"),@Property(name="BeanTraverseContext.detectRecursions.b",value="true")},beanFilters={javax.servlet.http.HttpServletRequest.class,javax.servlet.http.HttpSession.class,javax.servlet.ServletContext.class},pojoSwaps=EnumerationSwap.class,swagger=) public class RequestEchoResource extends BasicRestServlet
Constructor and Description |
---|
RequestEchoResource() |
Modifier and Type | Method and Description |
---|---|
javax.servlet.http.HttpServletRequest |
doGet(RestRequest req,
RestResponse res,
RequestProperties properties)
GET request handler
|
getOptions
destroy, getContext, getPath, getProperties, getRequest, getResponse, getServletConfig, init, log, log, log, log, logObjects, service, setContext, setRestResourceResolver
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
public RequestEchoResource()
@RestMethod(name="*", path="/*", converters={Traversable.class,Queryable.class}, summary="Serializes the incoming HttpServletRequest object.") public javax.servlet.http.HttpServletRequest doGet(RestRequest req, RestResponse res, RequestProperties properties)
Copyright © 2018 Apache. All rights reserved.