29 using System.Collections.Generic;
30 using System.Reflection;
33 using OpenMetaverse.StructuredData;
37 namespace OpenSim.Server.Handlers.Simulation
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 public static bool GetParams(
string uri, out UUID uuid, out UUID regionID, out
string action)
55 uri = uri.Trim(
new char[] {
'/' });
56 string[] parts = uri.Split(
'/');
57 if (parts.Length <= 1)
63 if (!UUID.TryParse(parts[1], out uuid))
66 if (parts.Length >= 3)
67 UUID.TryParse(parts[2], out regionID);
68 if (parts.Length >= 4)
82 buffer = OSDParser.DeserializeJson(data);
83 if (buffer.Type == OSDType.Map)
91 m_log.Debug((
"[REST COMMS]: Got OSD of unexpected type " + buffer.Type.ToString()));
97 m_log.Debug(
"[REST COMMS]: exception on parse of REST message " + ex.Message);
OpenMetaverse.StructuredData.OSDMap OSDMap
static OSDMap GetOSDMap(string data)
static bool GetParams(string uri, out UUID uuid, out UUID regionID, out string action)
Extract the param from an uri.
OpenMetaverse.StructuredData.OSD OSD