DataEncodingStrategy
public enum DataEncodingStrategy
The strategy to use for encoding Data values.
-
Defer to
Datafor choosing an encoding.Declaration
Swift
case deferredToData -
Encoded the
Dataas a Base64-encoded string. This is the default strategy.Declaration
Swift
case base64 -
Encode the
Dataas a custom value encoded by the given closure.If the closure fails to encode a value into the given encoder, the encoder will encode an empty automatic container in its place.
Declaration
Swift
case custom((Data, Encoder) throws -> Void)
View on GitHub
DataEncodingStrategy Enumeration Reference