-(ns travelconnect.http
-  (:use [clojure.contrib.java-utils :only [as-str]]
-	[clojure.contrib.str-utils :only [str-join]])
-  (:import (java.net URL
-                     URLEncoder))
+(ns clj-http.http
+  (:import (java.net URL URLEncoder))
   (:import org.apache.http.HttpEntity)
   (:import org.apache.http.HttpResponse)
   (:import org.apache.http.HttpRequestInterceptor)

  (:import org.apache.http.client.protocol.ClientContext)
  (:import org.apache.http.protocol.HttpContext)
  (:import org.apache.http.impl.client.DefaultHttpClient)
  (:require [clojure.contrib.http.agent :as ha])
  (:require [clojure.contrib.duck-streams :as ds]))

(defn url
  [link]

                                     (if (= "https" (.getScheme u))
                                       443
                                       80))]

                 (when-not (.getAuthScheme auth-state)
                   (.setCredentials (.getAttribute context ClientContext/CREDS_PROVIDER)
				    (AuthScope. target-host target-port) creds)
