Skip to content

Commit

Permalink
Fixing access level v2
Browse files Browse the repository at this point in the history
  • Loading branch information
henrik-dmg committed Jun 14, 2020
1 parent 04aeaaf commit 7c0bb71
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Sources/HPNetwork/DecodableRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ open class DecodableRequest<T: Decodable>: NetworkRequest {
public typealias Input = Data
public typealias Output = T

public var url: URL?
public let finishingQueue: DispatchQueue
public let requestMethod: NetworkRequestMethod
public let authentication: NetworkRequestAuthentication?

private let urlString: String

open var url: URL? {
URL(string: urlString)
}

open var decoder: JSONDecoder {
JSONDecoder()
}
Expand All @@ -20,7 +25,7 @@ open class DecodableRequest<T: Decodable>: NetworkRequest {
requestMethod: NetworkRequestMethod = .get,
authentication: NetworkRequestAuthentication? = nil)
{
self.url = URL(string: urlString)
self.urlString = urlString
self.finishingQueue = finishingQueue
self.requestMethod = requestMethod
self.authentication = authentication
Expand All @@ -32,7 +37,7 @@ open class DecodableRequest<T: Decodable>: NetworkRequest {
requestMethod: NetworkRequestMethod = .get,
authentication: NetworkRequestAuthentication? = nil)
{
self.url = url
self.urlString = url.absoluteString
self.finishingQueue = finishingQueue
self.requestMethod = requestMethod
self.authentication = authentication
Expand Down

0 comments on commit 7c0bb71

Please sign in to comment.