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

    method

    A Method to use, for example .get, .post, etc.

    path

    A path of the request (will be appended to the base URL, for example .path([“user”, “13”]).

    params

    The parameters of the request.

    headers

    A configuration object (Optional, e.g. if you want ot use custom configuration for a specific endpoint).

    configuration

    The configuration object of the request.

    mockFilePath

    A 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.