Skip to content

gentilijuanmanuel/CoreNetworking

 
 

Repository files navigation

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

About

A lightweight networking library.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%