1
0
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:
Dean Herbert 2020-01-16 12:51:43 +09:00
parent ef735f106e
commit 0d8b4e7c3e
3 changed files with 22 additions and 12 deletions

View File

@ -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

View 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!";
}
}

View File

@ -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;