mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 22:37:21 +08:00
Update GetBeatmapRequest
to use AddParameter
This commit is contained in:
parent
67ef1c40e6
commit
d7ac94038a
@ -1,6 +1,7 @@
|
||||
// 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;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
|
||||
@ -21,6 +22,17 @@ namespace osu.Game.Online.API.Requests
|
||||
filename = (beatmapInfo as BeatmapInfo)?.Path ?? string.Empty;
|
||||
}
|
||||
|
||||
protected override string Target => $@"beatmaps/lookup?id={beatmapInfo.OnlineID}&checksum={beatmapInfo.MD5Hash}&filename={System.Uri.EscapeUriString(filename)}";
|
||||
protected override WebRequest CreateWebRequest()
|
||||
{
|
||||
var request = base.CreateWebRequest();
|
||||
|
||||
request.AddParameter(@"id", beatmapInfo.OnlineID.ToString());
|
||||
request.AddParameter(@"checksum", beatmapInfo.MD5Hash);
|
||||
request.AddParameter(@"filename", filename);
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
protected override string Target => @"beatmaps/lookup";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user