This commit is contained in:
Archi
2021-05-30 17:12:39 +02:00
parent 299f2ef934
commit 181168b51f
2 changed files with 4 additions and 4 deletions

View File

@@ -389,7 +389,7 @@ namespace ArchiSteamFarm.Steam.Integration {
// Extra entry for format
Dictionary<string, object> arguments = new(3, StringComparer.Ordinal) {
{ "access_token", accessToken! },
{ "steamid", Bot.SteamID.ToString(CultureInfo.InvariantCulture) }
{ "steamid", Bot.SteamID }
};
KeyValue? response = null;

View File

@@ -771,11 +771,11 @@ namespace ArchiSteamFarm.Web {
requestMessage.Content = content;
break;
case IReadOnlyCollection<KeyValuePair<string?, string?>> dictionary:
case IReadOnlyCollection<KeyValuePair<string?, string?>> nameValueCollection:
try {
requestMessage.Content = new FormUrlEncodedContent(dictionary);
requestMessage.Content = new FormUrlEncodedContent(nameValueCollection);
} catch (UriFormatException) {
requestMessage.Content = new StringContent(string.Join("&", dictionary.Select(kv => WebUtility.UrlEncode(kv.Key) + "=" + WebUtility.UrlEncode(kv.Value))), null, "application/x-www-form-urlencoded");
requestMessage.Content = new StringContent(string.Join("&", nameValueCollection.Select(kv => WebUtility.UrlEncode(kv.Key) + "=" + WebUtility.UrlEncode(kv.Value))), null, "application/x-www-form-urlencoded");
}
break;