Inline TestGet

This commit is contained in:
YoshiRulz 2020-07-26 04:59:51 +10:00
parent a931d75143
commit da5f76967f
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 4 additions and 6 deletions

View File

@ -91,7 +91,5 @@ namespace BizHawk.Client.Common
Timeout = timeout;
}
}
public string TestGet() => Get(GetUrl).Result;
}
}

View File

@ -36,9 +36,9 @@ namespace BizHawk.Client.EmuHawk
public string MmfRead(string mmf_filename, int expectedSize) => GlobalWin.memoryMappedFiles.ReadFromFile(mmf_filename, expectedSize);
public string HttpTest() => string.Join("\n", GlobalWin.httpCommunication.TestGet(), GlobalWin.httpCommunication.SendScreenshot(), "done testing");
public string HttpTest() => string.Join("\n", HttpTestGet(), GlobalWin.httpCommunication.SendScreenshot(), "done testing");
public string HttpTestGet() => GlobalWin.httpCommunication.TestGet();
public string HttpTestGet() => GlobalWin.httpCommunication.Get(GlobalWin.httpCommunication.GetUrl).Result;
public string HttpGet(string url) => GlobalWin.httpCommunication.ExecGet(url);

View File

@ -171,7 +171,7 @@ namespace BizHawk.Client.EmuHawk
public string HttpTest()
{
var list = new StringBuilder();
list.AppendLine(GlobalWin.httpCommunication.TestGet());
list.AppendLine(GlobalWin.httpCommunication.Get(GlobalWin.httpCommunication.GetUrl).Result);
list.AppendLine(GlobalWin.httpCommunication.SendScreenshot());
list.AppendLine("done testing");
return list.ToString();
@ -181,7 +181,7 @@ namespace BizHawk.Client.EmuHawk
public string HttpTestGet()
{
CheckHttp();
return GlobalWin.httpCommunication?.TestGet();
return (GlobalWin.httpCommunication?.Get(GlobalWin.httpCommunication.GetUrl))?.Result;
}
[LuaMethod("httpGet", "makes a HTTP GET request")]