Structures
The following structures are available globally.
-
The Configuration is used to configure Cauli at initialization time. The
See moreConfiguration.standardis a sensibly chosen configuration set.Declaration
Swift
public struct Configuration -
A RecordSelector defines a selection of a Record object. It is used in the
See moreConfiguration.recordSelectorto define a subset of Records that should be handled by a Cauli instance.Declaration
Swift
public struct RecordSelector -
A record represents a full roundtrip of a URLRequest and it’s response.
See moreDeclaration
Swift
public struct Recordextension Record: Codable -
The
See moreResponsewrapps theURLResponseand the data received from the server.Declaration
Swift
public struct Response : Codable -
A
Mappingis a declaration of a single mapping. All urls that match the description of thesourceLocationwill be changed according to the description in thedestinationLocation. Allnilvalues are ignored in this case.Examples
This
Mappingwill update all http requests to https requests.Mapping(name: "https-ify", sourceLocation: MappingLocation(scheme: "http"), destinationLocation: MappingLocation(scheme: "https"))This mapping will redirect all requests to localhost.
See moreMapping(name: "map local", sourceLocation: MappingLocation(), destinationLocation: MappingLocation(host: "localhost")Declaration
Swift
public struct Mapping -
A mapping location describes a given part of a url. The mapping location can be used to either filter urls, or to apply changes on the url.
See moreDeclaration
Swift
public struct MappingLocation -
A RecordModifier defines the modification of a Record
See moreDeclaration
Swift
public struct RecordModifier
View on GitHub
Structures Reference