Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 956 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 956 Bytes

CoreNetworking

Swift

A lightweight networking library.

Usage

  • Use HTTPClient.shared for executing your requests.
  • You can change the default JsonDecoder if needed.

Logging

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
    )
)

Success Example:

success

Decoding Issue Example:

error