Skip to content

Commit

Permalink
Made init of DefaultHttpClient private and added new public init
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmcgee committed Sep 16, 2023
1 parent 207a286 commit 1acb721
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Sources/AMNetworking/HttpClient/DefaultHttpClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import Foundation

/// The default implementation of an http client used to perform network requests by passing in any given `Endpoint`.
public struct DefaultHttpClient: HttpClient {

/// The instance of `URLSession` used when making requests.
public let urlSession: URLSession
let urlSession: URLSession

/// Initializes an instance of a `DefaultHttpClient`.
/// - Parameter urlSession: The instance of `URLSession` used when making requests.
public init(urlSession: URLSession = .shared) {
public init() {
self.urlSession = .shared
}

init(urlSession: URLSession = .shared) {
self.urlSession = urlSession
}

Expand Down

0 comments on commit 1acb721

Please sign in to comment.