HTTPBodyStreamFloret

public class HTTPBodyStreamFloret : InterceptingFloret

The HTTPBodyStreamFloret can modify a Record where the request uses a httpBodyStream instead of setting the data on the request itself. It will read all data from the stream and set it as data on the request. This is helpful if you want to inspect Records in the storage or want to modify the requests body before it is sent to the server.

  • Declaration

    Swift

    public var enabled: Bool
  • Will create a new HTTPBodyStreamFloret instance.

    Declaration

    Swift

    public init(maximumConvertedByteSize: Int64 = 50 * 1024 )

    Parameters

    maximumConvertedByteSize

    The maximum size until which the data should be converted. Once more data is read from the httpBodyStream, the record will not be changed and the httpBodyStream is kept. Default is 50 * 1024.

  • Declaration

    Swift

    public func willRequest(_ record: Record, modificationCompletionHandler completionHandler: @escaping (Record) -> Void)
  • Declaration

    Swift

    public func didRespond(_ record: Record, modificationCompletionHandler completionHandler: @escaping (Record) -> Void)