MapRemoteFloret
public class MapRemoteFloret : InterceptingFloret
The MapRemoteFloret
can modify the url before the request is performed.
This is esp. helpful when using a staging or testing server.
The MapRemoteFloret
can only modify the url of a request. If you need to update headers please use the FindReplaceFloret
.
Example configuration. For more examples check the Mapping
documentation.
let httpsifyMapping = Mapping(name: "https-ify", sourceLocation: MappingLocation(scheme: "http"), destinationLocation: MappingLocation(scheme: "https"))
let mapLocal = Mapping(name: "map local", sourceLocation: MappingLocation(), destinationLocation: MappingLocation(host: "localhost")
let floret = MapRemoteFloret(mappings: [httpsifyMapping, mapLocal])
Cauli([floret])
-
Declaration
Swift
public var enabled: Bool { get set }
-
Declaration
Swift
public var description: String? { get }
-
Instantiates a new
MapRemoteFloret
instance with an array of mappings.Declaration
Swift
public init(mappings: [Mapping])
Parameters
mappings
An array of mappings. Mappings will be evaluated in the order of this array.
-
Undocumented
Declaration
Swift
public func viewController(_ cauli: Cauli) -> UIViewController