Skip to content

Commit

Permalink
Merge pull request #38 from BB9z/fix/curl-data-body
Browse files Browse the repository at this point in the history
cURL -d should use request body.
  • Loading branch information
kean authored Sep 13, 2021
2 parents 00d17cc + 876ede6 commit 7f385d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pulse/Sources/PulseUI/Extensions/URLRequest+cURL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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: "\\\"")
Expand Down

0 comments on commit 7f385d7

Please sign in to comment.