     }
 
     private func _encode(value: Any) -> String {
-        return self._encode(value: "\(value)")
+        if let string = value as? String {
+            return self._encode(value: string)
+        } else {
+            return self._encode(value: "\(value)")
+        }
     }
 
     private func _encode(value: String) -> String {
-        return value.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
+        return value.addingPercentEncoding(withAllowedCharacters: QApiRequest.ParamsCharacterSet)!
     }
 
 }

        QDebugString("Name: \(self.name)\n", &buffer, indent, nextIndent, indent)
        QDebugString("Filename: \(self.filename)\n", &buffer, indent, nextIndent, indent)
        QDebugString("Mimetype: \(self.mimetype)\n", &buffer, indent, nextIndent, indent)
        QDebugString("Fata: \(self.data)\n", &buffer, indent, nextIndent, indent)

        if footerIndent > 0 {
            buffer.append(String(repeating: "\t", count: footerIndent))

    }

    private func _prepareUrlQuery(query: String?, provider: IQApiProvider) -> String? {
        var rawParams: [String: Any] = [:]
        provider.urlParams.forEach({ (key, value) in
            rawParams[key] = value
        })
        if let query = query {
            let componentsUrlParams = query.components(
                pairSeparatedBy: "&",
                valueSeparatedBy: "="
            )
            componentsUrlParams.forEach({ (key, value) in
                rawParams[key] = value
            })
        }
        self.urlParams.forEach({ (key, value) in
            rawParams[key] = value
        })
        var result = String()
        let params = self._processingUrl(params: rawParams)
        params.forEach({ (key, value) in
            if result.count > 0 {
                result.append("&\(key)=\(value)")
            } else {
                result.append("\(key)=\(value)")
            }
        })
        if result.count > 0 {
