     let foundCookies: [HTTPCookie]
     if let headers = self.response?.HTTPHeaders, let url = self.response?.url {
       foundCookies = HTTPCookie.cookies(withResponseHeaderFields: headers,
-                                        for: url) as [HTTPCookie]
+                                        for: url)
     } else {
       foundCookies = []
     }

        components += self.queryComponents(key, value)
    }

    return (components.map{"\($0)=\($1)"} as [String]).joined(separator: "&")
  }

  func percentEncodeString(_ originalObject: Any) -> String {

        for (k, v) in finalHeaders {
          request.addValue(v, forHTTPHeaderField: k)
        }
        return request
      }

    }
