19 lines
526 B
Swift
19 lines
526 B
Swift
//
|
|
// DelegatingResponse.swift
|
|
// TuskerUITests
|
|
//
|
|
// Created by Shadowfacts on 12/31/19.
|
|
// Copyright © 2019 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import Ambassador
|
|
|
|
struct DelegatingResponse: WebApp {
|
|
let handler: (_ environ: [String: Any]) -> WebApp
|
|
|
|
func app(_ environ: [String : Any], startResponse: @escaping ((String, [(String, String)]) -> Void), sendBody: @escaping ((Data) -> Void)) {
|
|
handler(environ).app(environ, startResponse: startResponse, sendBody: sendBody)
|
|
}
|
|
}
|