EndpointConfiguration
public final class EndpointConfiguration
Endpoint configuration class which is used in EndpointProtocol implementations.
-
Endpoint 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 endpoint).
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
EndpointConfiguration Class Reference