ParameterEncoder
public protocol ParameterEncoder
A type that can encode any Encodable type into a URLRequest.
-
Encode the provided
Encodableparameters intorequest.Throws
AnErrorwhen encoding fails. For Alamofire provided encoders, this will be an instance ofAFError.parameterEncoderFailedwith an associatedParameterEncoderFailureReason.Declaration
Swift
func encode<Parameters>(_ parameters: Parameters?, into request: URLRequest) throws -> URLRequest where Parameters : EncodableParameters
parametersThe
Encodableparameter value.requestThe
URLRequestinto which to encode the parameters.Return Value
A
URLRequestwith the result of the encoding.
View on GitHub
Install in Dash
ParameterEncoder Protocol Reference