Package org.basex.http
Class RequestContext
- java.lang.Object
-
- org.basex.http.RequestContext
-
public final class RequestContext extends Object
Request of an HTTP or WebSocket connection.- Author:
- BaseX Team 2005-23, BSD License, Christian Gruen
-
-
Field Summary
Fields Modifier and Type Field Description javax.servlet.http.HttpServletRequestrequestHTTP servlet request.
-
Constructor Summary
Constructors Constructor Description RequestContext(javax.servlet.http.HttpServletRequest request)Returns an immutable map with all query parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IOContentbody()Returns the cached body.Map<String,Value>formValues(MainOptions options)Returns form parameters as XQuery Values.StringqueryString()Returns the original query string.Map<String,String[]>queryStrings()Returns the query parameters as strings.Map<String,Value>queryValues()Returns query parameters as XQuery values.
-
-
-
Method Detail
-
queryString
public String queryString()
Returns the original query string.- Returns:
- query string
-
queryStrings
public Map<String,String[]> queryStrings() throws IOException
Returns the query parameters as strings.- Returns:
- map
- Throws:
IOException- I/O exception
-
queryValues
public Map<String,Value> queryValues() throws IOException
Returns query parameters as XQuery values.- Returns:
- query parameters
- Throws:
IOException- I/O exception
-
formValues
public Map<String,Value> formValues(MainOptions options) throws QueryException, IOException
Returns form parameters as XQuery Values.- Parameters:
options- main options- Returns:
- parameters
- Throws:
IOException- I/O exceptionQueryException- query exception
-
body
public IOContent body() throws IOException
Returns the cached body.- Returns:
- value
- Throws:
IOException- I/O exception
-
-