diff options
Diffstat (limited to '')
-rw-r--r-- | OpenGridServices.GridServer/GridHttp.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenGridServices.GridServer/GridHttp.cs b/OpenGridServices.GridServer/GridHttp.cs index 758d761..c9cda61 100644 --- a/OpenGridServices.GridServer/GridHttp.cs +++ b/OpenGridServices.GridServer/GridHttp.cs | |||
@@ -116,7 +116,22 @@ namespace OpenGridServices.GridServer | |||
116 | } | 116 | } |
117 | 117 | ||
118 | static string ParseREST(string requestBody, string requestURL) { | 118 | static string ParseREST(string requestBody, string requestURL) { |
119 | char[] splitter = {'/'}; | ||
120 | string[] rest_params = requestURL.Split(splitter); | ||
121 | string req_type = rest_params[1]; // First part of the URL is the type of request - | ||
122 | switch(req_type) { | ||
123 | case "regions": | ||
124 | ulong regionhandle = (ulong)Convert.ToInt64(rest_params[2]); // get usersessions/sessionid | ||
125 | switch(rest_params[3]) { | ||
126 | case "neighbours": | ||
127 | return OpenGrid_Main.thegrid._regionmanager.GetXMLNeighbours(regionhandle); | ||
128 | break; | ||
129 | } | ||
130 | return "OK"; | ||
131 | break; | ||
132 | } | ||
119 | return ""; | 133 | return ""; |
134 | |||
120 | } | 135 | } |
121 | 136 | ||
122 | 137 | ||