Structures

The following structures are available globally.

  • The Configuration is used to configure Cauli at initialization time. The Configuration.standard is a sensibly chosen configuration set.

    See more

    Declaration

    Swift

    public struct Configuration
  • A RecordSelector defines a selection of a Record object. It is used in the Configuration.recordSelector to define a subset of Records that should be handled by a Cauli instance.

    See more

    Declaration

    Swift

    public struct RecordSelector
  • A record represents a full roundtrip of a URLRequest and it’s response.

    See more

    Declaration

    Swift

    public struct Record
    extension Record: Codable
  • The Response wrapps the URLResponse and the data received from the server.

    See more

    Declaration

    Swift

    public struct Response : Codable
  • A Mapping is a declaration of a single mapping. All urls that match the description of the sourceLocation will be changed according to the description in the destinationLocation. All nil values are ignored in this case.

    Examples

    This Mapping will 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.

    Mapping(name: "map local", sourceLocation: MappingLocation(), destinationLocation: MappingLocation(host: "localhost")
    
    See more

    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 more

    Declaration

    Swift

    public struct MappingLocation
  • A RecordModifier defines the modification of a Record

    See more

    Declaration

    Swift

    public struct RecordModifier