 
 #_(defrecord PostNewResource []
   Example
-  (resource-map [_] {})
+  (resource-map [_] '{})
   (request [_] {:method :get
                 :headers {"Accept" "text/plain"}})
   (expected-response [_] {:status 200}))

   :headers {"content-type" "text/html;charset=utf-8"}
   :body body})

(defrecord ExamplesService [router handlers]
  RouteProvider
  (routes [this]
    ["/examples"
     [["/"
       (vec
        (concat
         (for [h handlers]
           [(get-path h) (handler (keyword (basename h))
                                  (make-async-handler (eval (resource-map h))))])
         [["index.html"
           (handler
            ::index
            (fn [_]
              (ok
               (index (:routes @router) handlers))))]
          ["tests.html"
           (handler
            ::tests
            (fn [_]
              (ok (tests (:routes @router) handlers))))
           ]
          ["" (redirect ::index)]]))]
      ["" (redirect ::index)]]]))

(defn new-examples-service [& {:as opts}]
  (-> (->> opts
           (merge {:handlers
                   [(->BodyAsString)
                    (->StatusAndHeaders)
                    (->DynamicBody)
                    (->AsyncBody)

                    (->ResourceStateWithBody)
                    (->ResourceStateTopLevel)

                    (->ConditionalGet (:start-time component))

                    (->PutResourceMatchedEtag)
                    (->PutResourceUnmatchedEtag)
