From 3b7fe2e3ab1c8ee567eda54757a22b094782e173 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 11 Jan 2019 21:59:27 -0800 Subject: [PATCH] Send the crash log to the server. --- NetNewsWire/CrashReporter/CrashReporter.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NetNewsWire/CrashReporter/CrashReporter.swift b/NetNewsWire/CrashReporter/CrashReporter.swift index 2398cf1ab..73e79a98e 100644 --- a/NetNewsWire/CrashReporter/CrashReporter.swift +++ b/NetNewsWire/CrashReporter/CrashReporter.swift @@ -94,7 +94,7 @@ struct CrashReporter { } static func sendCrashLogText(_ crashLogText: String) { - let request = NSMutableURLRequest(url: URL(string: "https://ranchero.com/netnewswire/crashreportcatcher.php")!, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 60.0) + var request = URLRequest(url: URL(string: "https://ranchero.com/netnewswire/crashreportcatcher.php")!) request.httpMethod = HTTPMethod.post let boundary = "0xKhTmLbOuNdArY" @@ -106,7 +106,9 @@ struct CrashReporter { let formData = formString.data(using: .utf8, allowLossyConversion: true) request.httpBody = formData - // TODO: Implement one-shot-download method in RSWeb that takes a URL request. + download(request) { (_, _, _) in + // Don’t care about the result. + } } static func runCrashReporterWindow(_ crashLog: CrashLog) {