You may wish to review the Clojure Cookbook, online here, or even better in print form.
Web development with Clojure is also a good book.
I also have a "Hello World" example using the Pedestal library here.
Here is a sample request map using Pedestal:
request =>
{:protocol "HTTP/1.1",
:async-supported? true,
:remote-addr "127.0.0.1",
:servlet-response
#object[io.pedestal.test$test_servlet_response$reify__34946 0x3e71aa38 "io.pedestal.test$test_servlet_response$reify__34946@3e71aa38"],
:servlet
#object[io.pedestal.http.servlet.FnServlet 0x7168112e "io.pedestal.http.servlet.FnServlet@7168112e"],
:headers {"content-length" "0", "content-type" ""},
:server-port -1,
:servlet-request
#object[io.pedestal.test$test_servlet_request$reify__34934 0x3422eca "io.pedestal.test$test_servlet_request$reify__34934@3422eca"],
:content-length 0,
:content-type "",
:path-info "/echo/abcdef/12345",
:character-encoding "UTF-8",
:url-for #<Delay@5190186c: :not-delivered>,
:uri "/echo/abcdef/12345",
:server-name nil,
:query-string nil,
:path-params {:list-id "abcdef", :item-id "12345"},
:body
#object[io.pedestal.test.proxy$javax.servlet.ServletInputStream$ff19274a 0x2aff7cc4 "io.pedestal.test.proxy$javax.servlet.ServletInputStream$ff19274a@2aff7cc4"],
:scheme nil,
:request-method :get,
:context-path ""}
Update - There is almost no parsing required. You can generate a ring response with a very simple map:
(defn respond-hello [request] ; we ignore the request
{:status 200 :body "Hello, world!"})
Not sure what you are really after here.....? If you really want to do parsing from the ground up, the best option is Instaparse.