mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-25 06:50:28 +00:00
23 lines
567 B
Swift
23 lines
567 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import MastodonAPI
|
|
import Stubbing
|
|
|
|
extension MastodonAPITarget: Stubbing {
|
|
public func stub(url: URL) -> HTTPStub? {
|
|
(endpoint as? Stubbing)?.stub(url: url)
|
|
}
|
|
|
|
public func data(url: URL) -> Data? {
|
|
(endpoint as? Stubbing)?.data(url: url)
|
|
}
|
|
|
|
public func dataString(url: URL) -> String? {
|
|
(endpoint as? Stubbing)?.dataString(url: url)
|
|
}
|
|
|
|
public func statusCode(url: URL) -> Int? {
|
|
(endpoint as? Stubbing)?.statusCode(url: url)
|
|
}
|
|
}
|