Class OHttpRequestWrapper
java.lang.Object
com.orientechnologies.orient.server.network.protocol.http.OHttpRequestWrapper
Wrapper to use the HTTP request in functions and scripts. This class mimics the J2EE HTTPRequest
class.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Constructor Summary
ConstructorsConstructorDescriptionOHttpRequestWrapper(OHttpRequest iRequest) OHttpRequestWrapper(OHttpRequest iRequest, String[] iArgs) -
Method Summary
Modifier and TypeMethodDescriptiongetArgument(int iPosition) Returns the argument by positionString[]Returns the call's argument passed in REST form.Returns the request's content.Returns the request's content type.Return the request's HTTP headersReturn the request's HTTP method called.Return the request's HTTP version.Return the request's IF-MATCH header.getParameter(String iName) Returns the request's parameter.Returns the request's parameters.Returns the session-id.getURL()Returns the request's URL.getUser()Gets the request's user name.inthasParameters(String... iNames) Checks how many parameters have been received.booleanReturns if the requests has multipart.
-
Constructor Details
-
OHttpRequestWrapper
-
OHttpRequestWrapper
-
-
Method Details
-
getContent
Returns the request's content.- Returns:
- The content in form of String
-
getUser
Gets the request's user name.- Returns:
- The user name in form of String
-
getContentType
Returns the request's content type.- Returns:
- The content type in form of String
-
getHttpVersion
Return the request's HTTP version.- Returns:
- The HTTP method version in form of String
-
getHttpMethod
Return the request's HTTP method called.- Returns:
- The HTTP method name in form of String
-
getHeaders
Return the request's HTTP headers- Returns:
- The HTTP request headers in the form of a map
-
getIfMatch
Return the request's IF-MATCH header.- Returns:
- The if-match header in form of String
-
isMultipart
public boolean isMultipart()Returns if the requests has multipart.- Returns:
- true if is multipart, otherwise false
-
getArguments
Returns the call's argument passed in REST form. Example: /2012/10/26- Returns:
- Array of arguments
-
getArgument
Returns the argument by position- Returns:
- Array of arguments
-
getParameters
Returns the request's parameters.- Returns:
- The parameters as a Map<String,String>
-
getParameter
Returns the request's parameter.- Returns:
- The parameter value if any otherwise null
-
hasParameters
Checks how many parameters have been received.- Returns:
- The number of parameters found between the passed ones
-
getSessionId
Returns the session-id.- Returns:
- The session-id in form of String
-
getURL
Returns the request's URL.- Returns:
- The URL requested in form of String
-
getRemoteAddress
-