mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-18 15:30:30 +00:00
Misc
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user