Fixed previous commit

This commit is contained in:
ruri
2020-03-27 01:53:27 +01:00
parent 4b35a4c496
commit af74358487
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -414,7 +414,7 @@ namespace RuriLib
// Perform the request
try
{
(data.Address, data.ResponseCode, data.ResponseHeaders, data.Cookies) = request.Perform(localUrl, Method, data.ConfigSettings.IgnoreResponseErrors, GetLogBuffer(data));
(data.Address, data.ResponseCode, data.ResponseHeaders, data.Cookies) = request.Perform(localUrl, Method, GetLogBuffer(data));
}
catch
{
+2 -4
View File
@@ -234,11 +234,9 @@ namespace RuriLib.Functions.Requests
/// </summary>
/// <param name="url">The URL</param>
/// <param name="method">The HTTP method</param>
/// <param name="ignoreErrors">Whether to ignore response errors</param>
/// <param name="log">The log (if any)</param>
/// <returns>A 4-tuple containing Address, Response code, Headers and Cookies.</returns>
public (string, string, Dictionary<string, string>, Dictionary<string, string>) Perform(string url, HttpMethod method,
bool ignoreErrors = false, List<LogEntry> log = null)
public (string, string, Dictionary<string, string>, Dictionary<string, string>) Perform(string url, HttpMethod method, List<LogEntry> log = null)
{
var address = "";
var responseCode = "0";
@@ -295,7 +293,7 @@ namespace RuriLib.Functions.Requests
if (log != null) log.Add(new LogEntry("Status code: " + responseCode, Colors.Cyan));
}
if (!ignoreErrors) throw;
throw;
}
return (address, responseCode, headers, cookies);