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() Asynchronous

    Undocumented

    Declaration

    Swift

    public func end() async throws
  • Undocumented

    Declaration

    Swift

    public func cancel() throws

Send

  • send(_:encoder:) Asynchronous

    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(_:html:) Asynchronous

    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() Asynchronous

    Undocumented

    Declaration

    Swift

    public func send() async throws

Append

  • 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

  • write(_:encoder:) Asynchronous

    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

  • redirect(_:permanent:) Asynchronous

    Undocumented

    Declaration

    Swift

    public func redirect(_ location: String, permanent: Bool = false) async throws

Proxy

CORS