Fixed: (SpeedCD) Incorrect Http Login Method

Fixes #582
pull/591/head
Qstick 3 years ago
parent 8e43ea4bbc
commit 22412981bb

@ -57,11 +57,12 @@ namespace NzbDrone.Core.Indexers.Definitions
{
var requestBuilder = new HttpRequestBuilder(string.Format("{0}/{1}", Settings.BaseUrl.TrimEnd('/'), "checkpoint/API"))
{
Method = HttpMethod.POST,
LogResponseContent = true,
AllowAutoRedirect = true
};
var loginPage = await ExecuteAuth(requestBuilder.Build());
var loginPage = await ExecuteAuth(requestBuilder.AddFormParameter("username", Settings.Username).Build());
var tokenRegex = new Regex(@"name=\\""a\\"" value=\\""([^""]+)\\""");
var matches = tokenRegex.Match(loginPage.Content);
@ -76,6 +77,7 @@ namespace NzbDrone.Core.Indexers.Definitions
var requestBuilder2 = new HttpRequestBuilder(string.Format("{0}/{1}", Settings.BaseUrl.TrimEnd('/'), "checkpoint/"))
{
Method = HttpMethod.POST,
LogResponseContent = true,
AllowAutoRedirect = true
};

Loading…
Cancel
Save