Tusker/TuskerUITests/API Mocks/DelegatingResponse.swift

19 lines
526 B
Swift
Raw Normal View History

2019-12-31 11:40:56 -05:00
//
// 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)
}
}