PlaybackSequence

public enum PlaybackSequence

A type that indicates how the VCR instance should playback the recorded HTTP interactions from the loaded Cassette.

  • Ignoring the request made by the dataTask methods play the Tracks in the Cassette in the order they are presented to the VCR instance.

    Declaration

    Swift

    case cassetteOrder
  • Using the request made by the dataTask methods attempt to use the supplied properties to match a Track in the Cassette.

    The set of Track instances in a Cassette have the Array<MatchType> applied to them if all the MatchType constraints match for a given Track that instance is assumed to match the matching constraint. If one, or more, MatchType does not match for a given Track then the Track is not considered a match.

    Parameter

    Parameter matching: An Array of MatchType instances to construct a match between a Track.Request instance and URLRequest instance.

    Declaration

    Swift

    case properties(matching: [MatchType])

    Parameters

    matching

    An Array of MatchType instances to construct a match between a Track.Request instance and URLRequest instance.

  • A type the defines a property by which a Track and URLRequest are compared to see if they are a match.

    In order to properly replay previously recorded requests, VHS can match HTTP requests to a previously recorded one.

    See more

    Declaration

    Swift

    public enum MatchType