Skip to content

Commit b1f3318

Browse files
authored
Remove local utilties (#17)
1 parent 60e74b0 commit b1f3318

File tree

6 files changed

+22
-98
lines changed

6 files changed

+22
-98
lines changed

Package.resolved

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ let package = Package(
1616
targets: ["HTTPEngine"]),
1717
],
1818
dependencies: [
19+
.package(url: "https://github.com/JZDesign/SwiftUtilities.git", .upToNextMajor(from: "0.1.0")),
1920
.package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.0.0"))
2021
],
2122
targets: [
2223
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
2324
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2425
.target(
2526
name: "HTTPEngine",
26-
dependencies: []),
27+
dependencies: ["SwiftUtilities"]),
2728
.testTarget(
2829
name: "HTTPEngineTests",
2930
dependencies: [

Sources/HTTPEngine/HTTPEngine+ConvenienceMethods.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// swiftlint:disable line_length
2+
import SwiftUtilities
23
import Foundation
34
import Combine
45

Sources/HTTPEngine/HTTPEngine.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// swiftlint:disable line_length
2+
import SwiftUtilities
23
import Foundation
34
import Combine
45

@@ -120,3 +121,12 @@ public struct HTTPEngine {
120121
}
121122

122123
}
124+
125+
public extension URLRequest {
126+
127+
/// Combine convenience method
128+
/// - Returns: URLSession.DataTaskPublisher
129+
func dataTaskPublisher() -> URLSession.DataTaskPublisher {
130+
return URLSession.shared.dataTaskPublisher(for: self)
131+
}
132+
}

Sources/HTTPEngine/Utilities.swift

Lines changed: 0 additions & 55 deletions
This file was deleted.

Tests/HTTPEngineTests/UtilityTests.swift

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)