         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)
+        QDebugString("Data: \(self.data)\n", &buffer, indent, nextIndent, indent)
 
         if footerIndent > 0 {
             buffer.append(String(repeating: "\t", count: footerIndent))

        }
        return nil
    }

    private func _prepareHeaders(provider: IQApiProvider) -> [String: String] {
        var result: [String: String] = [:]
        provider.headers.forEach({ (key: String, value: String) in
            result[key] = value
        })
        self.headers.forEach({ (key: String, value: String) in
            result[key] = value
        })
        return result
    }

    private func _prepareBody(provider: IQApiProvider, headers: inout [String: String]) -> Data? {
        if let bodyData = self.bodyData {
            headers["Content-Length"] = "\(bodyData.count)"
            return bodyData
        } else {
            var allParams: [String: Any] = [:]
            if let bodyParams = provider.bodyParams {
                bodyParams.forEach({ (key: String, value: Any) in
                    allParams[key] = value
                })
            }
            if let bodyParams = self.bodyParams {
                bodyParams.forEach({ (key: String, value: Any) in
                    allParams[key] = value
                })
            }
            let flatParams = self._flatParams(params: allParams)
            if let uploadedItems = self.uploadItems {
                var data = Data()
                let boundary = UUID().uuidString
                flatParams.forEach({ (key: String, value: Any) in
                    let encodeKey = self._encode(value: key)
                    let rowString = "--\(boundary)\r\nContent-Disposition: form-data; name=\"\(encodeKey)\"\r\n\r\n\(value)\r\n"
                    if let rowData = rowString.data(using: .ascii) {
                        data.append(rowData)
                    }
                })
                uploadedItems.forEach({ (uploadedItem: QApiRequestUploadItem) in
                    let encodeName = self._encode(value: uploadedItem.name)
                    let encodeFilename = self._encode(value: uploadedItem.filename)
                    let headerString = "--\(boundary)\r\nContent-Disposition: form-data; name=\"\(encodeName)\"; filename=\"\(encodeFilename)\"\r\nContent-Type: \(uploadedItem.mimetype)\r\n\r\n"

    }

    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)!
    }

}
