   (do (when (nil? @*urlfetch-service*)
 	(reset! *urlfetch-service* (URLFetchServiceFactory/getURLFetchService)))
       @*urlfetch-service*))
-
-(defn- urlify [url]
-  (if (string? url) (java.net.URL. url) url))
 
 (defrecord HTTPResponse [content
 			 final-url

  (zipmap (map #(keyword (.getName %)) headers)
	  (map #(.getValue %) headers)))

(defn- parse-response
  [^com.google.appengine.api.urlfetch.HTTPResponse r]
  (HTTPResponse. (.getContent r)

(ns appengine-magic.services.urlfetch
  (:import [com.google.appengine.api.urlfetch
            URLFetchServiceFactory
            FetchOptions
            FetchOptions$Builder
            HTTPRequest
            HTTPMethod])
  (:require [clojure.contrib.string :as string]))

(defonce *urlfetch-service* (atom nil))

