OutgoingResponse
public final class OutgoingResponse
Undocumented
-
Undocumented
Declaration
Swift
public private(set) var headers: Headers<HttpResponse> { get }
-
Undocumented
Declaration
Swift
public var status: HttpStatus { get set }
-
Undocumented
Declaration
Swift
public var contentType: String? { get set }
-
Undocumented
Declaration
Swift
@discardableResult public func contentType(_ value: String) -> Self
-
Undocumented
Declaration
Swift
@discardableResult public func status(_ newValue: HttpStatus) -> Self
-
Undocumented
Declaration
Swift
@discardableResult public func header(_ name: String, _ value: String?) -> Self
-
Undocumented
Declaration
Swift
@discardableResult public func header(_ name: HttpHeader, _ value: String?) -> Self
-
end()
AsynchronousUndocumented
Declaration
Swift
public func end() async throws
-
Undocumented
Declaration
Swift
public func cancel() throws
-
send(_:
Asynchronousencoder: ) Undocumented
Declaration
Swift
public func send<T>(_ value: T, encoder: JSONEncoder = .init()) async throws where T : Encodable
-
send(_:
Asynchronous) Undocumented
Declaration
Swift
public func send(_ jsonObject: [String : Any]) async throws
-
send(_:
Asynchronous) Undocumented
Declaration
Swift
public func send(_ jsonArray: [Any]) async throws
-
send(_:
Asynchronoushtml: ) Undocumented
Declaration
Swift
public func send(_ text: String, html: Bool = false) async throws
-
send(_:
Asynchronous) Undocumented
Declaration
Swift
public func send(_ data: Data) async throws
-
send(_:
Asynchronous) Undocumented
Declaration
Swift
public func send(_ bytes: [UInt8]) async throws
-
send()
AsynchronousUndocumented
Declaration
Swift
public func send() async throws
-
pipeFrom(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func pipeFrom(_ sources: ReadableBody...) async throws -> Self
-
pipeFrom(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func pipeFrom(_ sources: [ReadableBody]) async throws -> Self
-
append(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func append(_ sources: ReadableBody...) async throws -> Self
-
append(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func append(_ sources: [ReadableBody]) async throws -> Self
-
write(_:
Asynchronousencoder: ) Undocumented
Declaration
Swift
@discardableResult public func write<T>(_ value: T, encoder: JSONEncoder = .init()) async throws -> Self where T : Encodable
-
write(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func write(_ jsonObject: [String : Any]) async throws -> Self
-
write(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func write(_ jsonArray: [Any]) async throws -> Self
-
write(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func write(_ text: String) async throws -> Self
-
write(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func write(_ data: Data) async throws -> Self
-
write(_:
Asynchronous) Undocumented
Declaration
Swift
@discardableResult public func write(_ bytes: [UInt8]) async throws -> Self
-
redirect(_:
Asynchronouspermanent: ) Undocumented
Declaration
Swift
public func redirect(_ location: String, permanent: Bool = false) async throws
-
proxy(_:
Asynchronousstreaming: ) Undocumented
Declaration
Swift
public func proxy(_ response: FetchResponse, streaming: Bool = false) async throws
-
Undocumented
Declaration
Swift
@discardableResult public func cors( origin: String = "*", methods: [HttpMethod] = [.get, .head, .put, .patch, .post, .delete, .query], allowHeaders: [HttpHeaderRepresentable]? = nil, allowCredentials: Bool? = nil, exposeHeaders: [HttpHeaderRepresentable]? = nil, maxAge: Int = 600 ) -> Self