mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 21:52:57 +08:00
Fix user agent missing in registration
This commit is contained in:
parent
ef735f106e
commit
0d8b4e7c3e
@ -162,16 +162,6 @@ namespace osu.Game.Online.API
|
||||
[JsonProperty("error")]
|
||||
public string ErrorMessage { get; set; }
|
||||
}
|
||||
|
||||
private class OsuWebRequest : WebRequest
|
||||
{
|
||||
public OsuWebRequest(string uri)
|
||||
: base(uri)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string UserAgent => "osu!";
|
||||
}
|
||||
}
|
||||
|
||||
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.
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.IO.Network;
|
||||
|
||||
namespace osu.Game.Online.API
|
||||
{
|
||||
public class RegistrationRequest : WebRequest
|
||||
public class RegistrationRequest : OsuWebRequest
|
||||
{
|
||||
internal string Username;
|
||||
internal string Email;
|
||||
|
Loading…
Reference in New Issue
Block a user