File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Sources/GoodNetworking/Logging Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ internal extension DataTaskProxy {
2323 \( prepareHeaders ( request: task. originalRequest) )
2424
2525 📤 Request body:
26- \( prettyPrintMessage ( data: task. originalRequest? . httpBody, mimeType : " json " /*We always encode to JSON*/ ) )
26+ \( prettyPrintMessage ( data: task. originalRequest? . httpBody) )
2727
2828 📦 Received data:
2929 \( prettyPrintMessage ( data: receivedData, mimeType: task. response? . mimeType) )
@@ -53,7 +53,7 @@ internal extension DataTaskProxy {
5353 . joined ( separator: " \n " )
5454 }
5555
56- @NetworkActor private func prettyPrintMessage( data: Data ? , mimeType: String ? ) -> String {
56+ @NetworkActor private func prettyPrintMessage( data: Data ? , mimeType: String ? = " text/plain " ) -> String {
5757 guard let data else { return " " }
5858 guard plainTextMimeTypeHeuristic ( mimeType) else { return " 🏞️ Detected MIME type is not plain text " }
5959 guard data. count < Self . maxLogSizeBytes else {
You can’t perform that action at this time.
0 commit comments