AnyRequestable
public struct AnyRequestable<RequestBody, ResponseBody, ResponseError> : Requestable where ResponseError : Error
A type erased Requestable
wrapper, with no other functional differences.
-
Create an
AnyRequestable
from something that conforms toRequestable
Declaration
Swift
public init<T>(_ requestable: T) where RequestBody == T.RequestBody, ResponseBody == T.ResponseBody, ResponseError == T.ResponseError, T : Requestable
Parameters
requestable
The
Requestable
to type-erase
-
Declaration
Swift
public var path: String { get }
-
Declaration
Swift
public var query: [URLQueryItem] { get }
-
Declaration
Swift
public var method: RequestMethod { get }
-
Declaration
Swift
public var headers: RequestHeaders { get }
-
Declaration
Swift
public var body: RequestBody? { get }
-
Undocumented
Declaration
Swift
public var authentication: RequestAuthentication? { get }
-
Declaration
Swift
public var fallbackResponse: Response? { get }
-
Declaration
Swift
public var requestEncoder: BodyEncoder<RequestBody> { get }
-
Declaration
Swift
public var responseDecoder: BodyDecoder<ResponseBody> { get }
-
Declaration
Swift
public var responseValidator: ResponseValidator<ResponseBody, ResponseError> { get }
-
Declaration
Swift
public var timeoutInterval: TimeInterval { get }