Back to Alamofire

DataPreprocessor

docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DataPreprocessor.html

5.12.01021 B
Original Source

DataPreprocessor

public protocol DataPreprocessor : Sendable

Type used to preprocess Data before it handled by a serializer.

`

                preprocess(_:)
                `

Process Data before it’s handled by a serializer.

Declaration

Swift

func preprocess(_ data: Data) throws -> Data

Parameters

| data |

The raw Data to process.

|

Available where Self == PassthroughPreprocessor

`

                passthrough
                ` Extension method 

Provides a PassthroughPreprocessor instance.

Declaration

Swift

public static var passthrough: PassthroughPreprocessor { get }

Available where Self == GoogleXSSIPreprocessor

`

                googleXSSI
                ` Extension method 

Provides a GoogleXSSIPreprocessor instance.

Declaration

Swift

public static var googleXSSI: GoogleXSSIPreprocessor { get }