Class WebAPIHelper
A helper class containing various methods that are used by the HTTP controllers.
Inheritance
java.lang.Object
WebAPIHelper
Inherited Members
java.lang.Object.clone()
java.lang.Object.equals(java.lang.Object)
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.hashCode()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)
Namespace:
Assembly: .dll
Syntax
public final class WebAPIHelper
Constructors
WebAPIHelper()
Declaration
public WebAPIHelper()
Methods
extractGame(Map<String,String> headers)
Extracts the game from the headers of a HTTP request.
Declaration
public static final String extractGame(Map<String,String> headers)
Parameters
Type | Name | Description |
---|---|---|
java. |
headers | The headers of the HTTP request |
Returns
Type | Description |
---|---|
java. |
The game if key was found in headers, "" else |
extractJsonBody(IHTTPSession session)
Extracts a json string from the body of a HTTP session.
Declaration
public static final String extractJsonBody(IHTTPSession session)
Parameters
Type | Name | Description |
---|---|---|
org. |
session | The session to get the body of |
Returns
Type | Description |
---|---|
java. |
The json string if successful, "" else |
extractSessionId(Map<String,String> headers)
Extracts the sessionId from the headers of a HTTP request.
Declaration
public static final UUID extractSessionId(Map<String,String> headers)
Parameters
Type | Name | Description |
---|---|---|
java. |
headers | The headers of the HTTP request |
Returns
Type | Description |
---|---|
java. |
The sessionId if key was found in headers, null else |
tryParseUUID(String UUIDString)
Parses a UUID from a given string.
Declaration
public static final UUID tryParseUUID(String UUIDString)
Parameters
Type | Name | Description |
---|---|---|
java. |
UUIDString | The string to parse |
Returns
Type | Description |
---|---|
java. |
The UUID if successfully parsed, null else |