Allow get requests

This commit is contained in:
Zontreck 2023-10-07 22:18:14 -07:00
parent c4e7b6fa54
commit 0a022634c1

View file

@ -17,6 +17,8 @@ namespace LibAC
#pragma warning restore IDE1006 // Naming Styles
{
HttpRequestMessage hrm = new HttpRequestMessage();
if (sJson == "") hrm.Method = HttpMethod.Get;
else
hrm.Method = HttpMethod.Post;
hrm.RequestUri = new Uri(url);
hrm.Content = new StringContent(sJson, Encoding.UTF8, "application/json");
@ -27,6 +29,8 @@ namespace LibAC
#pragma warning restore IDE1006 // Naming Styles
{
HttpRequestMessage hrm = new HttpRequestMessage();
if (sJson == "") hrm.Method = HttpMethod.Get;
else
hrm.Method = HttpMethod.Post;
hrm.RequestUri = new Uri(url);
hrm.Headers.Add("X-SecondLife-Owner-Key", xSLOwner);