We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 644c532 commit 8088aa4Copy full SHA for 8088aa4
Sources/StructuredAPIClient/Transport/Transport.swift
@@ -26,6 +26,13 @@ public struct TransportResponse {
26
27
/// The raw HTTP response body. If there was no response body, this will have a zero length.
28
public let body: Data
29
+
30
+ /// Create a new `TransportResponse`. Intended for use by `Transport` implementations.
31
+ public init(status: HTTPStatusCode, headers: [String: String], body: Data) {
32
+ self.status = status
33
+ self.headers = headers
34
+ self.body = body
35
+ }
36
}
37
38
/// A `Transport` maps a `URLRequest` to a `Status` and `Data` pair asynchronously.
0 commit comments