RequestBytesWithCookies: add support for headers

This commit is contained in:
kaso17 2017-02-15 20:47:06 +01:00
parent f85a2cc5c7
commit d6bcfa7e2e
1 changed files with 2 additions and 1 deletions

View File

@ -417,7 +417,7 @@ namespace Jackett.Indexers
throw lastException;
}
protected async Task<WebClientByteResult> RequestBytesWithCookies(string url, string cookieOverride = null, RequestType method = RequestType.GET, string referer = null, IEnumerable<KeyValuePair<string, string>> data = null)
protected async Task<WebClientByteResult> RequestBytesWithCookies(string url, string cookieOverride = null, RequestType method = RequestType.GET, string referer = null, IEnumerable<KeyValuePair<string, string>> data = null, Dictionary<string, string> headers = null)
{
var request = new Utils.Clients.WebRequest()
{
@ -426,6 +426,7 @@ namespace Jackett.Indexers
Cookies = cookieOverride ?? CookieHeader,
PostData = data,
Referer = referer,
Headers = headers,
Encoding = Encoding
};