Update EstateTools.cs

This commit is contained in:
Madpeter 2025-07-08 17:10:47 +01:00
parent 78ea90a1c0
commit c584188c1b

View file

@ -35,6 +35,8 @@ using System.Security.Cryptography.X509Certificates;
using System.Security.Policy;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
namespace OpenMetaverse
{
@ -636,8 +638,14 @@ namespace OpenMetaverse
request["restrict_pushobject"] = blockObjectPush;
request["allow_parcel_changes"] = allowParcelChanges;
request["block_parcel_search"] = blockParcelSearch;
OSDLlsdXml body = new OSDLlsdXml(request);
using (var reply = await Client.HttpCapsClient.PostAsync(uri.ToString(), null))
// Serialize OSDMap to XML string
string requestBody = request.ToString();
// Use StringContent to convert the string to HttpContent
using (var content = new StringContent(requestBody, Encoding.UTF8, "application/llsd+xml"))
{
using (var reply = await Client.HttpCapsClient.PostAsync(uri.ToString(), content))
{
bool success = reply.IsSuccessStatusCode;
@ -648,6 +656,7 @@ namespace OpenMetaverse
}
}
}
}
/// <summary>Estate panel "Debug" tab settings</summary>
public void SetRegionDebug(bool disableScripts, bool disableCollisions, bool disablePhysics)