RouteConfiguration
public final class RouteConfiguration
Route configuration class which is used in Route protocol implementations.
-
Route configuration initializer
Declaration
Swift
public init(method: Method, path: Path, params: [String: Any?]? = nil, headers: [String: String]? = nil, configuration: Configuration? = nil, mockFilePath: Path? = nil)Parameters
methodA Method to use, for example .get, .post, etc.
pathA path of the request (will be appended to the base URL, for example .path([“user”, “13”]).
paramsThe parameters of the request.
headersA configuration object (Optional, e.g. if you want ot use custom configuration for a specific route).
configurationThe configuration object of the request.
mockFilePathA path of the file in the mock data bundle specified in configuration object. This will be used only if useMockData is set to true in the configuration object.
View on GitHub
Install in Dash
RouteConfiguration Class Reference