             (it)))
 
         (context "getting the governance resource"
-          (with response (http-get-request "/circles/1234/governance/5678"))
+          (with response (http-request :get "/circles/1234/governance/5678"))
           (it "should return a 200"
             (should= 200 (:status @response)))
           (it "should return the details of the governance resource"

      (around [it]
        (with-redefs [p/get-governance-log govt-meeting-not-found-thrower]
          (it)))
      (context "putting to the agenda endpoint"
        (with response (http-put-request "/circles/1234/governance/5678/agenda"
                                         "New agenda"))
        (it "should return a 400"
          (should= 400 (:status @response))
          (should-contain "Governance meeting does not exist" (:body @response)))))


(def host-url "http://localhost:3000")

(def http-request-fns
  {:get http-client/get 
   :put http-client/put 
   :post http-client/post})

(defn http-request 
  ([method uri]
   (http-request method uri nil))
  ([method uri options]
   (apply (get http-request-fns method) 
          [(str host-url uri) 
           (merge {:throw-exceptions false
                   :content-type "text/plain"
                   :body ""} options)])))

(defn get-location [response]
  (get (:headers response) "Location"))

(def sample-gov-log {:body "Add role\nRename accountability."})

