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