Support custom coding keys! 🎉
Use DictionaryEncoder
for headers, so now you could define your custom coding keys e.g. like this
struct Headers: Codable {
var platform: String?
var sdk: String?
var version: String?
var id: String?
enum CodingKeys: String, CodingKey {
case platform = "X-Mobile-Platform"
case sdk = "X-Mobile-SDK"
case version = "X-Mobile-A"
case id = "X-Mobile-ID"
}
}
Use DictionaryEncoder
for multipart
Implement FormURLEncodedPayload
protocol and sendFormURLEncoded
method
Conform PayloadProtocol
to just Encodable
Conform ResultType
to just Decodable
Rename buildQuery(_)
into buildURLEncodedString(from:)
Improve error messages printing, now use Logger instead of just printing
Update Example project to demonstrate custom coding keys for headers
Update readme, add info