Create SynchronousRestObjectRequester and make SynchronousRestObjectPoster
use that. Mark SynchronousRestObjectPoster.BeginPostObject as obsolete.0.6.5-rc1
parent
dc4f31db1a
commit
a983f2a3ac
|
@ -35,6 +35,15 @@ using System.Xml.Serialization;
|
||||||
namespace OpenSim.Framework.Servers.HttpServer
|
namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
public class SynchronousRestObjectPoster
|
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>
|
/// <summary>
|
||||||
/// Perform a synchronous REST request.
|
/// 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
|
/// <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>
|
/// 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);
|
Type type = typeof (TRequest);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue