TNRouteConfiguration
public class TNRouteConfiguration
Used to configure a route
-
Route configuration initializer
Declaration
Swift
public init(method: TNMethod, path: TNPath, params: [String: Any?]? = nil, headers: [String: String]? = nil, configuration: TNConfiguration? = nil, mockFilePath: TNPath? = nil)
Parameters
method
A TNMethod to use, for example .get, .post, etc.
path
A path that will be appended to the base url speficified in the environment, for example .path([“user”, “13”])
params
The params that will be send to server based on the request body type
headers
The headers that will be send to server, this will be merged with the existed headers if specified in condiguration object
configuration
The configuration object of the request.
mockFilePath
A path of the response in the mock data bundle specified in configuration object. This will be used only if useMockData is set to true in the configuration object