[api-upload-refactor] Add test target, relax decode constraints, add HTTPBody + MultipartForm
- Package: new LCEssentialsTests target (runs on iOS simulator) - JSONDecoder.decode: T: Codable -> T: Decodable & Sendable (4 overloads); remove try! in decode(fromURL:); honour encoding param in decode(_:using:) - Propagate & Sendable to Data.object, Dictionary.toObjetct, API.request return - LCEHTTPBody: HTTPBody protocol, JSONBody, FormURLEncodedBody, RawBody, factories - LCEMultipartForm: multipart builder, OutputStream-streamed serialize(), in-memory + on-disk file parts, ported mimeType(for:) - Tests: StubURLProtocol harness + 15 tests
This commit is contained in:
@@ -39,5 +39,8 @@ let package = Package(
|
||||
.target(
|
||||
name: "LCEssentials",
|
||||
dependencies: targetDependencies),
|
||||
.testTarget(
|
||||
name: "LCEssentialsTests",
|
||||
dependencies: ["LCEssentials"]),
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user