mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Update WebRequest usage in line with framework changes
This commit is contained in:
parent
59d908861e
commit
8fab6abf90
@ -1 +1 @@
|
|||||||
Subproject commit 383a8da7bc45af498288b4b72c72a048a0996e74
|
Subproject commit 26f3091dcaf47e3b355b7f7ad83b292621d7d6b5
|
@ -7,7 +7,6 @@ using System.Configuration;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.IO.Network;
|
using osu.Framework.IO.Network;
|
||||||
using FileWebRequest = osu.Framework.IO.Network.FileWebRequest;
|
using FileWebRequest = osu.Framework.IO.Network.FileWebRequest;
|
||||||
@ -391,8 +390,8 @@ namespace osu.Desktop.Deploy
|
|||||||
|
|
||||||
public static void AuthenticatedBlockingPerform(this WebRequest r)
|
public static void AuthenticatedBlockingPerform(this WebRequest r)
|
||||||
{
|
{
|
||||||
r.AddHeader("Authorization", $"token {GitHubAccessToken}");
|
r.Headers.Add("Authorization", $"token {GitHubAccessToken}");
|
||||||
r.BlockingPerform();
|
r.Perform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,12 +401,7 @@ namespace osu.Desktop.Deploy
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override HttpWebRequest CreateWebRequest(string requestString = null)
|
protected override string Accept => "application/octet-stream";
|
||||||
{
|
|
||||||
var req = base.CreateWebRequest(requestString);
|
|
||||||
req.Accept = "application/octet-stream";
|
|
||||||
return req;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class ReleaseLine
|
internal class ReleaseLine
|
||||||
|
@ -106,7 +106,7 @@ namespace osu.Game.Online.API
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!WebRequest.Aborted) //could have been aborted by a Cancel() call
|
if (!WebRequest.Aborted) //could have been aborted by a Cancel() call
|
||||||
WebRequest.BlockingPerform();
|
WebRequest.Perform();
|
||||||
|
|
||||||
if (checkAndProcessFailure())
|
if (checkAndProcessFailure())
|
||||||
return;
|
return;
|
||||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Online.API
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
req.BlockingPerform();
|
req.Perform();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
@ -61,7 +61,7 @@ namespace osu.Game.Online.API
|
|||||||
ClientSecret = clientSecret
|
ClientSecret = clientSecret
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
req.BlockingPerform();
|
req.Perform();
|
||||||
|
|
||||||
Token = req.ResponseObject;
|
Token = req.ResponseObject;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user