File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ public struct FunctionURLResponse: Codable, Sendable {
92
92
public let cookies : [ String ] ?
93
93
public var isBase64Encoded : Bool ?
94
94
95
+ @available ( * , deprecated, message: " Use init(statusCode:headers:body:isBase64Encoded:cookies:) instead " )
95
96
public init (
96
97
statusCode: HTTPResponse . Status ,
97
98
headers: HTTPHeaders ? = nil ,
@@ -105,4 +106,18 @@ public struct FunctionURLResponse: Codable, Sendable {
105
106
self . cookies = cookies
106
107
self . isBase64Encoded = isBase64Encoded
107
108
}
109
+
110
+ public init (
111
+ statusCode: HTTPResponse . Status ,
112
+ headers: HTTPHeaders ? = nil ,
113
+ body: String ? = nil ,
114
+ isBase64Encoded: Bool ? = nil ,
115
+ cookies: [ String ] ? = nil
116
+ ) {
117
+ self . statusCode = statusCode
118
+ self . headers = headers
119
+ self . body = body
120
+ self . cookies = cookies
121
+ self . isBase64Encoded = isBase64Encoded
122
+ }
108
123
}
You can’t perform that action at this time.
0 commit comments