                     (->ResourceState)
                     (->ResourceStateWithBody)
                     (->ResourceStateTopLevel)
+
+                    (->ConditionalGet)
+
                     (->PutResourceMatchedEtag)
                     (->PutResourceUnmatchedEtag)
                     (->ServiceUnavailable)

(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))))
         ]]))]))

(defn new-examples-service [& {:as opts}]
  (-> (->> opts

  (path [r] [(basename r) "/" [long :account]])
  (path-args [_] [:account 17382343])
  (request [_] {:method :get})
  (expected-response [_] {:status 200}))

;; Conditional GETs

(defrecord ConditionalGet []
  Example
  (resource-map [_] {:body "Hello World!"})
  (request [_] {:method :get
                :headers {"Accept" "text/plain"}})
  (expected-response [_] {:status 200}))

;; POSTS
