From 91c2c3c096d4d70c7962ef7b9ad4264ca8875ec6 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 3 Nov 2007 14:04:59 +0000 Subject: testing different rest post method/class for Grid asset client. (possible that I haven't set the post url correctly) --- .../Communications/Cache/GridAssetClient.cs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache') 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; using System.Xml.Serialization; using libsecondlife; using OpenSim.Framework.Console; +using OpenSim.Framework.Servers; namespace OpenSim.Framework.Communications.Cache { @@ -103,16 +104,17 @@ namespace OpenSim.Framework.Communications.Cache { try { - MemoryStream s = new MemoryStream(); - - XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); - xs.Serialize(s, asset); - RestClient rc = new RestClient(_assetServerUrl); - MainLog.Instance.Verbose("ASSET", "Storing {0}", rc); - rc.AddResourcePath("assets"); - rc.RequestMethod = "POST"; - rc.Request(s); - MainLog.Instance.Verbose("ASSET", "Stored {0}", rc); + // MemoryStream s = new MemoryStream(); + + // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); + // xs.Serialize(s, asset); + // RestClient rc = new RestClient(_assetServerUrl); + MainLog.Instance.Verbose("ASSET", "Storing asset"); + //rc.AddResourcePath("assets"); + // rc.RequestMethod = "POST"; + // rc.Request(s); + //MainLog.Instance.Verbose("ASSET", "Stored {0}", rc); + RestObjectPoster.BeginPostObject(_assetRequests + "/assets/", asset); } catch (Exception e) { -- cgit v1.1