mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix user agent missing in registration
This commit is contained in:
@ -162,16 +162,6 @@ namespace osu.Game.Online.API
|
|||||||
[JsonProperty("error")]
|
[JsonProperty("error")]
|
||||||
public string ErrorMessage { get; set; }
|
public string ErrorMessage { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private class OsuWebRequest : WebRequest
|
|
||||||
{
|
|
||||||
public OsuWebRequest(string uri)
|
|
||||||
: base(uri)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string UserAgent => "osu!";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class APIException : InvalidOperationException
|
public class APIException : InvalidOperationException
|
||||||
|
21
osu.Game/Online/API/OsuWebRequest.cs
Normal file
21
osu.Game/Online/API/OsuWebRequest.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.IO.Network;
|
||||||
|
|
||||||
|
namespace osu.Game.Online.API
|
||||||
|
{
|
||||||
|
public class OsuWebRequest : WebRequest
|
||||||
|
{
|
||||||
|
public OsuWebRequest(string uri)
|
||||||
|
: base(uri)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public OsuWebRequest()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string UserAgent => "osu!";
|
||||||
|
}
|
||||||
|
}
|
@ -2,11 +2,10 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.IO.Network;
|
|
||||||
|
|
||||||
namespace osu.Game.Online.API
|
namespace osu.Game.Online.API
|
||||||
{
|
{
|
||||||
public class RegistrationRequest : WebRequest
|
public class RegistrationRequest : OsuWebRequest
|
||||||
{
|
{
|
||||||
internal string Username;
|
internal string Username;
|
||||||
internal string Email;
|
internal string Email;
|
||||||
|
Reference in New Issue
Block a user