2020-07-29 23:50:30 +00:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
2020-08-30 23:33:11 +00:00
|
|
|
import Mastodon
|
2020-07-29 23:50:30 +00:00
|
|
|
|
2020-08-30 23:59:49 +00:00
|
|
|
extension Target: Stubbing {
|
2020-07-29 23:50:30 +00:00
|
|
|
func stub(url: URL) -> HTTPStub? {
|
|
|
|
(endpoint as? Stubbing)?.stub(url: url)
|
|
|
|
}
|
|
|
|
|
|
|
|
func data(url: URL) -> Data? {
|
|
|
|
(endpoint as? Stubbing)?.data(url: url)
|
|
|
|
}
|
|
|
|
|
|
|
|
func dataString(url: URL) -> String? {
|
|
|
|
(endpoint as? Stubbing)?.dataString(url: url)
|
|
|
|
}
|
|
|
|
|
|
|
|
func statusCode(url: URL) -> Int? {
|
|
|
|
(endpoint as? Stubbing)?.statusCode(url: url)
|
|
|
|
}
|
|
|
|
}
|