Revert "Use different URL to resolve #3358"

This reverts commit 328a3748f5.
This commit is contained in:
Łukasz Domeradzki
2024-12-20 13:45:14 +01:00
parent 96279a96bb
commit b251598ca4

View File

@@ -1430,12 +1430,11 @@ public sealed class ArchiWebHandler : IDisposable {
internal async Task<(EResult Result, EPurchaseResultDetail PurchaseResult)> AddFreeLicense(uint subID) {
ArgumentOutOfRangeException.ThrowIfZero(subID);
Uri request = new(SteamStoreURL, "/freelicense/addfreelicense");
Uri request = new(SteamStoreURL, $"/freelicense/addfreelicense/{subID}");
// Extra entry for sessionID
Dictionary<string, string> data = new(3, StringComparer.Ordinal) {
{ "ajax", "true" },
{ "subid", subID.ToString(CultureInfo.InvariantCulture) }
Dictionary<string, string> data = new(2, StringComparer.Ordinal) {
{ "ajax", "true" }
};
ObjectResponse<JsonNode>? response = await UrlPostToJsonObjectWithSession<JsonNode>(request, data: data, requestOptions: WebBrowser.ERequestOptions.ReturnClientErrors | WebBrowser.ERequestOptions.ReturnServerErrors | WebBrowser.ERequestOptions.AllowInvalidBodyOnErrors).ConfigureAwait(false);