Class RequestContext
- java.lang.Object
- 
- com.inductiveautomation.ignition.gateway.dataroutes.RequestContext
 
- 
 public class RequestContext extends java.lang.ObjectWrapper around an HttpServletRequest to include some helpful data forRouteHandlerinstances.
- 
- 
Constructor SummaryConstructors Constructor Description RequestContext(javax.servlet.http.HttpServletRequest request, java.lang.String path)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description GatewayContextgetGatewayContext()HttpMethodgetMethod()Returns the HttpMethod of the requestjava.lang.StringgetParameter(java.lang.String name)Fetch a named parameter.java.lang.StringgetPath()Returns the URL path that that matched the route.java.net.URIgetRelativeRequestUri()javax.servlet.http.HttpServletRequestgetRequest()The underlying web requestjava.net.URIgetRequestUri()voidputParameter(java.lang.String name, java.lang.String value)java.lang.StringreadBody()
 
- 
- 
- 
Method Detail- 
getGatewayContextpublic GatewayContext getGatewayContext() 
 - 
getRequestpublic javax.servlet.http.HttpServletRequest getRequest() The underlying web request
 - 
getPathpublic java.lang.String getPath() Returns the URL path that that matched the route. This will not include /data/module/
 - 
getMethodpublic HttpMethod getMethod() Returns the HttpMethod of the request
 - 
readBodypublic java.lang.String readBody() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getParameterpublic java.lang.String getParameter(java.lang.String name) Fetch a named parameter. First this will match any parameters that were part of the route's named parameters. For example, if your route was /widgets/:id you may call getParameter("id") and it will return the value from the request URL that matched the :id parameter. If it does not match a route parameter, it will delegate to the internal HttpServletRequest's parameter map, which comes from the URL's query string or post parameters. 
 - 
putParameterpublic void putParameter(java.lang.String name, java.lang.String value)
 - 
getRequestUripublic java.net.URI getRequestUri() - Returns:
- the full URI for this HTTP Request (example: http://example.com:8088/foo/bar?baz=abc)
 
 - 
getRelativeRequestUripublic java.net.URI getRelativeRequestUri() - Returns:
- the relative URI for this HTTP Request (example: /foo/bar?baz=abc)
 
 
- 
 
-