             if let url = components.url {
                 var headers = self._prepareHeaders(provider: provider)
                 let bodyData = self._prepareBody(provider: provider, headers: &headers)
+                var rawHeaders: [String: String] = [:]
+                headers.forEach({ rawHeaders[$0.0] = $0.1 })
                 var urlRequest = URLRequest(url: url)
                 urlRequest.httpMethod = self.method
                 urlRequest.cachePolicy = self.cachePolicy
                 urlRequest.timeoutInterval = self.timeout
-                urlRequest.allHTTPHeaderFields = headers
+                urlRequest.allHTTPHeaderFields = rawHeaders
                 if let body = bodyData {
                     urlRequest.httpBody = body
                 }

        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 _encode(value: Any) -> String {
        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: QApiRequest.ParamsCharacterSet)!
    }

}
