mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-22 14:16:59 +01:00
WebClient.GetResultAsync(): allow request.PostData to be null
This commit is contained in:
@@ -173,7 +173,8 @@ namespace Jackett.Common.Utils.Clients
|
||||
var postData = "";
|
||||
if (request.Type == RequestType.POST)
|
||||
{
|
||||
var lines = request.PostData.Select(kvp => kvp.Key + "=" + kvp.Value);
|
||||
var lines = request.PostData?.Select(kvp => kvp.Key + "=" + kvp.Value);
|
||||
lines ??= new List<string>();
|
||||
postData = $" PostData: {{{string.Join(", ", lines)}}} RawBody: {request.RawBody}";
|
||||
}
|
||||
logger.Debug($"WebClient({ClientType}).GetResultAsync(Method: {request.Type} Url: {request.Url}{postData})");
|
||||
|
||||
Reference in New Issue
Block a user