mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Can now specify a cookie for BitMeTv.
This commit is contained in:
parent
d1ce1bf218
commit
96469be7f0
5 changed files with 46 additions and 5 deletions
|
@ -59,6 +59,15 @@ namespace NzbDrone.Common.Http
|
|||
AddRequestHeaders(webRequest, request.Headers);
|
||||
}
|
||||
|
||||
if (request.Cookies.Count != 0)
|
||||
{
|
||||
webRequest.CookieContainer = new CookieContainer();
|
||||
foreach (var pair in request.Cookies)
|
||||
{
|
||||
webRequest.CookieContainer.Add(new Cookie(pair.Key, pair.Value, "/", request.Url.Host));
|
||||
}
|
||||
}
|
||||
|
||||
if (!request.Body.IsNullOrWhiteSpace())
|
||||
{
|
||||
var bytes = request.Headers.GetEncodingFromContentType().GetBytes(request.Body.ToCharArray());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue