anchor.diff:  Connection: Keep-Alive
   Date: Fri, 17 Jun 2016 16:44:23 GMT
   Last-Modified: Fri, 17 Jun 2016 16:43:02 GMT
  -ETag: -1727906851
  +ETag: fa863bd7ff53786d286e4bb3c0134416
   Content-Type: text/plain;charset=utf-8
   Vary: accept-charset
   Content-Length: 23
  
positive.code: user=>
  ----
  
  == View the source
  
  Fire up an editor and load up the file `src/edge/web.clj`.
  
  Locate the function called `content-routes` and search for the `"Hello World!"` string.
  
  [source,clojure]
  ----
  (defn content-routes [_]
    ["/"
     [ <1>
      ["index.html"
       (->
        (templated-page-resource "index.html" (fn [ctx] {:foo "bar" :ctx ctx}))
        (assoc :id ::index))]
  
      ["" (yada/redirect ::index)]
  
      ;; Add some pairs (as vectors) here. First item is the path, second is the handler.
      ;; Here's an example
      ["hello" (yada/handler "Hello World!\n")] <2>
  
  
  <<<<<<< Updated upstream
  [source,clojure]
  ----
  ["hello" (yada/handler "Hello World!\n")]
  ----
  
  If you have curl on your machine, use it to send it a web request. Alternatively, use a web browser.
  
  [source]
  ----
  curl -i http://localhost:3000/test
  ----
  
  You should see something similar to the following:
  
  [source]
  ----
  HTTP/1.1 200 OK
  Content-Length: 15
  Content-Type: text/plain;charset=utf-8
  Last-Modified: Wed, 15 Jun 2016 10:17:03 GMT
  Vary: accept-charset
  ETag: -1277479543
  Server: Aleph/0.4.1
  Connection: Keep-Alive
  Date: Wed, 15 Jun 2016 10:17:06 GMT
  
  Hello World!
  ----
  
  Now make a change to this line.
  
  [source,clojure]
  ----
  ["hello" (yada/handler "Hello Wonderful World!\n")]
  ----
  
  Go to your REPL and reset your system to pick up the changes:
  
  [source]
  ----
  user=> (reset)
  :reloading (edge.web edge.server edge.system user)
  :resumed
  ----
  
  Try the curl command (or web browser) again and verify the updated result.
  
  If it works, you're now ready to proceed with link:{next}[next chapter], where we will discuss this example in more depth.
  =======
      [""
       (-> (yada/as-resource (io/file "target"))
           (assoc :id ::static))]
  
      ]])
  ----
  
  <1> The start of a series of vector pairs. These associate URI paths with handlers.
  <2> Change the string here from `"Hello World"` to `"Hello Wonderful World"`.
  
  Now go back to your REPL and enter `(reset)`.
  
  Finally, refresh your browser — http://localhost:3000 — and check that the message has changed.
  
  == Introducing Resources
  
  Edge uses a link:https://github.com/juxt/bidi[bidi] route structure to define URI paths.
  
  
negative.code: [source,http]
  ----
  Last-Modified: Sun, 09 Aug 2015 07:25:10 GMT
  ETag: fa863bd7ff53786d286e4bb3c0134416
  ----
  
  The *Last-Modified* header shows when the string `Hello World!` was created. As Java strings are immutable, [yada]#yada# is able to deduce that the
  string's creation date is also the last time it could have been modified.
  
  The entity tag is computed from the value of the `Hello World!` itself. The same goes for the entity tag. Both `Last-Modified` and `ETag` are used to support HTTP conditional requests and conflict detection when uploading new versions of a resource.
  
  Next we have a header telling us the media-type of the string's
  representation.
  
  [source,http]
  ----
  Content-Type: text/plain;charset=utf-8
  ----
  
  yada is able to determine that the media-type is text, but without more
  clues it defaults to `text/plain`.
  
  [source,http]
  ----
  Vary: accept-charset
  ----
  