 
 (ns yada.dev.examples
   (:require
-   [bidi.bidi :refer (handler RouteProvider path-for)]
+   [bidi.bidi :refer (handler RouteProvider path-for alts)]
+   [bidi.ring :refer (redirect)]
    [schema.core :as s]
    [clojure.java.io :as io]
    [clojure.string :as string]

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

  (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
