aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
parent* removed always true if (diff)
downloadopensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
index 6338531..cfb585b 100644
--- a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
+++ b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
@@ -1,4 +1,4 @@
1/* 1/*
2* Copyright (c) Contributors, http://opensimulator.org/ 2* Copyright (c) Contributors, http://opensimulator.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Servers
39 { 39 {
40 public static TResponse BeginPostObject<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) 40 public static TResponse BeginPostObject<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
41 { 41 {
42 Type type = typeof(TRequest); 42 Type type = typeof (TRequest);
43 43
44 WebRequest request = WebRequest.Create(requestUrl); 44 WebRequest request = WebRequest.Create(requestUrl);
45 request.Method = verb; 45 request.Method = verb;
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers
57 writer.Flush(); 57 writer.Flush();
58 } 58 }
59 59
60 int length = (int)buffer.Length; 60 int length = (int) buffer.Length;
61 request.ContentLength = length; 61 request.ContentLength = length;
62 62
63 Stream requestStream = request.GetRequestStream(); 63 Stream requestStream = request.GetRequestStream();
@@ -65,12 +65,10 @@ namespace OpenSim.Framework.Servers
65 TResponse deserial = default(TResponse); 65 TResponse deserial = default(TResponse);
66 using (WebResponse resp = request.GetResponse()) 66 using (WebResponse resp = request.GetResponse())
67 { 67 {
68 68 XmlSerializer deserializer = new XmlSerializer(typeof (TResponse));
69 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); 69 deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream());
70 deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream());
71 } 70 }
72 return deserial; 71 return deserial;
73 } 72 }
74
75 } 73 }
76} 74} \ No newline at end of file