mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-27 16:00:29 +00:00
21 lines
501 B
Swift
21 lines
501 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
extension MastodonTarget: Stubbing {
|
|
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)
|
|
}
|
|
}
|