Skip to content

Commit

Permalink
Remove debug info from HttpNetworkProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
DelevoXDG committed Sep 15, 2023
1 parent bdb8a7e commit c329677
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Sources/Starknet/Network/HttpNetworkProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,12 @@ class HttpNetworkProvider {
throw HttpNetworkProviderError.encodingError
}

// Print JSON request payload
if let jsonString = String(data: encoded, encoding: .utf8) {
print("IN: \(jsonString)")
}

let request = makeRequestWith(body: encoded, config: config)

guard let (data, response) = try? await session.data(for: request) else {
throw HttpNetworkProviderError.unknownError
}

// Print JSON response
if let jsonString = String(data: data, encoding: .utf8) {
print("OUT: \(jsonString)")
}

if let result = try? JSONDecoder().decode(U.self, from: data) {
return result
} else if let response = response as? HTTPURLResponse, response.statusCode < 200 || response.statusCode > 299 {
Expand Down

0 comments on commit c329677

Please sign in to comment.