PropertyListEncoding
public struct PropertyListEncoding : ParameterEncoding
                Uses PropertyListSerialization to create a plist representation of the parameters object, according to the
associated format and write options values, which is set as the body of the request. The Content-Type HTTP header
field of an encoded request is set to application/x-plist.
- 
                  
                  
Returns a default
PropertyListEncodinginstance.Declaration
Swift
public static var `default`: PropertyListEncoding { get } - 
                  
                  
Returns a
PropertyListEncodinginstance with xml formatting and default writing options.Declaration
Swift
public static var xml: PropertyListEncoding { get } - 
                  
                  
Returns a
PropertyListEncodinginstance with binary formatting and default writing options.Declaration
Swift
public static var binary: PropertyListEncoding { get } - 
                  
                  
The property list serialization format.
Declaration
Swift
public let format: PropertyListSerialization.PropertyListFormat - 
                  
                  
The options for writing the parameters as plist data.
Declaration
Swift
public let options: PropertyListSerialization.WriteOptions 
- 
                  
                  
Creates a
PropertyListEncodinginstance using the specified format and options.Declaration
Swift
public init( format: PropertyListSerialization.PropertyListFormat = .xml, options: PropertyListSerialization.WriteOptions = 0)Parameters
formatThe property list serialization format.
optionsThe options for writing the parameters as plist data.
Return Value
The new
PropertyListEncodinginstance. 
- 
                  
                  
Creates a URL request by encoding parameters and applying them onto an existing request.
Throws
An
Errorif the encoding process encounters an error.Declaration
Swift
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequestParameters
urlRequestThe request to have parameters applied.
parametersThe parameters to apply.
Return Value
The encoded request.
 
      PropertyListEncoding Structure Reference