mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
Create SynchronousRestObjectRequester and make SynchronousRestObjectPoster
use that. Mark SynchronousRestObjectPoster.BeginPostObject as obsolete.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user