From 876ede664d3b7c02c9579a04b897326b7e567015 Mon Sep 17 00:00:00 2001 From: BB9z Date: Mon, 13 Sep 2021 23:00:14 +0800 Subject: [PATCH] cURL -d should use request body. --- Pulse/Sources/PulseUI/Extensions/URLRequest+cURL.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pulse/Sources/PulseUI/Extensions/URLRequest+cURL.swift b/Pulse/Sources/PulseUI/Extensions/URLRequest+cURL.swift index a4b42c067..4003dda3b 100644 --- a/Pulse/Sources/PulseUI/Extensions/URLRequest+cURL.swift +++ b/Pulse/Sources/PulseUI/Extensions/URLRequest+cURL.swift @@ -20,7 +20,7 @@ extension NetworkLoggerSummary { components.append("-H \"\(header.key): \(escapedValue)\"") } - if let httpBodyData = responseBody { + if let httpBodyData = requestBody { let httpBody = String(decoding: httpBodyData, as: UTF8.self) var escapedBody = httpBody.replacingOccurrences(of: "\\\"", with: "\\\\\"") escapedBody = escapedBody.replacingOccurrences(of: "\"", with: "\\\"")