Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Sources/MicroClient/NetworkClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
/// The network client interface.
public protocol NetworkClientProtocol: Sendable {

/// Initializes the client with a given configuration.
/// - Parameter configuration: The client configuration.
init(
configuration: NetworkConfiguration
)

/// Performs the network request.
///
/// - Parameter networkRequest: The network request to perform.
Expand Down Expand Up @@ -56,7 +50,7 @@

// swiftlint:disable function_body_length

private func performRequest<ResponseModel>(

Check warning on line 53 in Sources/MicroClient/NetworkClient.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Function should have complexity 10 or less; currently complexity is 12 (cyclomatic_complexity)
_ networkRequest: NetworkRequest<some Any, ResponseModel>,
attempt: Int
) async throws -> NetworkResponse<ResponseModel> {
Expand Down Expand Up @@ -106,7 +100,7 @@
}

if let httpResponse = response as? HTTPURLResponse {
log(.info, "Response: \(httpResponse.statusCode) \(urlRequest.httpMethod ?? "") \(urlRequest.url?.absoluteString ?? "")")

Check warning on line 103 in Sources/MicroClient/NetworkClient.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Line should be 120 characters or less; currently it has 133 characters (line_length)
log(.debug, "Response headers: \(httpResponse.allHeaderFields)")

guard (200...299).contains(httpResponse.statusCode) else {
Expand Down