diff options
testing different rest post method/class for Grid asset client. (possible that I haven't set the post url correctly)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/GridAssetClient.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index 64e561b..632f96c 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs | |||
@@ -32,6 +32,7 @@ using System.IO; | |||
32 | using System.Xml.Serialization; | 32 | using System.Xml.Serialization; |
33 | using libsecondlife; | 33 | using libsecondlife; |
34 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
35 | using OpenSim.Framework.Servers; | ||
35 | 36 | ||
36 | namespace OpenSim.Framework.Communications.Cache | 37 | namespace OpenSim.Framework.Communications.Cache |
37 | { | 38 | { |
@@ -103,16 +104,17 @@ namespace OpenSim.Framework.Communications.Cache | |||
103 | { | 104 | { |
104 | try | 105 | try |
105 | { | 106 | { |
106 | MemoryStream s = new MemoryStream(); | 107 | // MemoryStream s = new MemoryStream(); |
107 | 108 | ||
108 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); | 109 | // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); |
109 | xs.Serialize(s, asset); | 110 | // xs.Serialize(s, asset); |
110 | RestClient rc = new RestClient(_assetServerUrl); | 111 | // RestClient rc = new RestClient(_assetServerUrl); |
111 | MainLog.Instance.Verbose("ASSET", "Storing {0}", rc); | 112 | MainLog.Instance.Verbose("ASSET", "Storing asset"); |
112 | rc.AddResourcePath("assets"); | 113 | //rc.AddResourcePath("assets"); |
113 | rc.RequestMethod = "POST"; | 114 | // rc.RequestMethod = "POST"; |
114 | rc.Request(s); | 115 | // rc.Request(s); |
115 | MainLog.Instance.Verbose("ASSET", "Stored {0}", rc); | 116 | //MainLog.Instance.Verbose("ASSET", "Stored {0}", rc); |
117 | RestObjectPoster.BeginPostObject<AssetBase>(_assetRequests + "/assets/", asset); | ||
116 | } | 118 | } |
117 | catch (Exception e) | 119 | catch (Exception e) |
118 | { | 120 | { |