A lightweight networking library.
- Use HTTPClient.shared for executing your requests.
- You can change the default JsonDecoder if needed.
There is a NetworkLogger
object, that, by default will print useful information about the requests and responses to the console.
If you don't want the logger, you can just override the object with a quiet
configuration:
HTTPClient.shared.networkLogger = .init(configuration: .quiet)
// Or:
HTTPClient.shared.networkLogger = .init(
configuration: .verbose(
logRequests: true, // Log requests
logResponses: false // Doesn't log responses
)
)