freshOS / ws-deprecated

⚠️ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing)
MIT License
353 stars 32 forks source link

Fix multipart params parsing #44

Closed maxkonovalov closed 7 years ago

maxkonovalov commented 7 years ago

This fix allows using any types of parameter values with multipart requests.

The following will be possible:

let x: Int? = 42
let params: [AnyHashable: Any] = ["Int": 1, "Bool": true, "String": "X", "Double": 3.14, "Optional": x]

Note that it also handles optionals - the above will correctly output "42" rather than "Optional(42)". If the optional value is nil, this parameter will be omitted.

Resolves #43