Create SynchronousRestObjectRequester and make SynchronousRestObjectPoster

use that. Mark SynchronousRestObjectPoster.BeginPostObject as obsolete.
0.6.5-rc1
Melanie Thielker 2009-05-10 16:31:10 +00:00
parent dc4f31db1a
commit a983f2a3ac
1 changed files with 10 additions and 1 deletions

View File

@ -35,6 +35,15 @@ using System.Xml.Serialization;
namespace OpenSim.Framework.Servers.HttpServer
{
public class SynchronousRestObjectPoster
{
[Obsolete]
public static TResponse BeginPostObject<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
{
return SynchronousRestObjectRequester.MakeRequest<TRequest, TResponse>(verb, requestUrl, obj);
}
}
public class SynchronousRestObjectRequester
{
/// <summary>
/// Perform a synchronous REST request.
@ -46,7 +55,7 @@ namespace OpenSim.Framework.Servers.HttpServer
///
/// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
public static TResponse BeginPostObject<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
{
Type type = typeof (TRequest);