@RestResource(path="/echo", title="Request echo service", description="Echos the current HttpServletRequest object back to the browser.", swagger=) @HtmlDocConfig(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 <c>HttpServletRequest</c> 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") @BeanConfig(maxDepth="5", detectRecursions="true", beanFilters={javax.servlet.http.HttpServletRequest.class,javax.servlet.http.HttpSession.class,javax.servlet.ServletContext.class}, pojoSwaps=EnumerationSwap.class) public class RequestEchoResource extends BasicRest
Constructor and Description |
---|
RequestEchoResource() |
Modifier and Type | Method and Description |
---|---|
HttpServletRequest |
doGet(RestRequest req)
GET request handler.
|
getOptions
public RequestEchoResource()
@RestMethod(name="*", path="/*", converters={Traversable.class,Queryable.class}, summary="Serializes the incoming HttpServletRequest object.") public HttpServletRequest doGet(RestRequest req)
req
- The HTTP servlet request.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.