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])