mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
Fix use of GrrrLCU
This commit is contained in:
@@ -51,10 +51,11 @@ namespace Needlework.Net.ViewModels
|
|||||||
_ => throw new Exception("Method is not selected."),
|
_ => throw new Exception("Method is not selected."),
|
||||||
};
|
};
|
||||||
|
|
||||||
var processInfo = Connector.GetProcessInfo();
|
var processInfo = ProcessFinder.Get();
|
||||||
var requestBody = WeakReferenceMessenger.Default.Send(new ContentRequestMessage(), "ConsoleRequestEditor").Response;
|
var requestBody = WeakReferenceMessenger.Default.Send(new ContentRequestMessage(), "ConsoleRequestEditor").Response;
|
||||||
var content = new StringContent(requestBody, new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"));
|
var content = new StringContent(requestBody, new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"));
|
||||||
var response = await Connector.SendAsync(method, RequestPath, content);
|
var client = Connector.GetLcuHttpClientInstance();
|
||||||
|
var response = await client.SendAsync(new(method, RequestPath) { Content = content });
|
||||||
var riotAuthentication = new RiotAuthentication(processInfo.RemotingAuthToken);
|
var riotAuthentication = new RiotAuthentication(processInfo.RemotingAuthToken);
|
||||||
var responseBody = await response.Content.ReadAsByteArrayAsync();
|
var responseBody = await response.Content.ReadAsByteArrayAsync();
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Needlework.Net.ViewModels
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var processInfo = Connector.GetProcessInfo();
|
var processInfo = ProcessFinder.Get();
|
||||||
return processInfo;
|
return processInfo;
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
@@ -77,7 +77,7 @@ namespace Needlework.Net.ViewModels
|
|||||||
_ => throw new Exception("Method is missing.")
|
_ => throw new Exception("Method is missing.")
|
||||||
};
|
};
|
||||||
|
|
||||||
var processInfo = Connector.GetProcessInfo();
|
var processInfo = ProcessFinder.Get();
|
||||||
var sb = new StringBuilder(Path);
|
var sb = new StringBuilder(Path);
|
||||||
foreach (var pathParameter in Operation.PathParameters)
|
foreach (var pathParameter in Operation.PathParameters)
|
||||||
{
|
{
|
||||||
@@ -99,7 +99,8 @@ namespace Needlework.Net.ViewModels
|
|||||||
var requestBody = WeakReferenceMessenger.Default.Send(new ContentRequestMessage(), "EndpointRequestEditor").Response;
|
var requestBody = WeakReferenceMessenger.Default.Send(new ContentRequestMessage(), "EndpointRequestEditor").Response;
|
||||||
var content = new StringContent(requestBody, new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"));
|
var content = new StringContent(requestBody, new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"));
|
||||||
|
|
||||||
var response = await Connector.SendAsync(method, uri, content);
|
var client = Connector.GetLcuHttpClientInstance();
|
||||||
|
var response = await client.SendAsync(new(method, uri) { Content = content });
|
||||||
var riotAuthentication = new RiotAuthentication(processInfo.RemotingAuthToken);
|
var riotAuthentication = new RiotAuthentication(processInfo.RemotingAuthToken);
|
||||||
var responseBytes = await response.Content.ReadAsByteArrayAsync();
|
var responseBytes = await response.Content.ReadAsByteArrayAsync();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user