Skip to content

Instantly share code, notes, and snippets.

@joinr
Created June 13, 2022 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joinr/2d9df2ab7146e979ac99498770756a22 to your computer and use it in GitHub Desktop.
Save joinr/2d9df2ab7146e979ac99498770756a22 to your computer and use it in GitHub Desktop.
a sample request map
{:reitit.core/match
#reitit.core.Match{:template "/test2", :data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:result
#reitit.ring.Methods{:get #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :get, :middleware []},
:head #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :head, :middleware []},
:post #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :post, :middleware []},
:put #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :put, :middleware []},
:delete #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :delete, :middleware []},
:connect #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :connect, :middleware []},
:options #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :options, :middleware []},
:trace #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :trace, :middleware []},
:patch #reitit.ring.Endpoint{:data {:handler #function[rental.routes.home/home-routes/fn--30830]},
:handler #function[rental.routes.home/home-routes/fn--30830],
:path "/test2", :method :patch, :middleware []}},
:path-params {}, :path "/test2"},
:reitit.core/router #object[reitit.core$mixed_router$reify__14198 0x6c0bf80c "reitit.core$mixed_router$reify__14198@6c0bf80c"],
:protocol "HTTP/1.1",
:cookies {"_ga" {:value "GA1.1.1518985717.1625000600"}, "JSESSIONID" {:value "koI9O9huP2PEfiOrOqNLZ-C10RIYjUkJMotSN8Ua"}},
:remote-addr "127.0.0.1",
:params {},
:flash nil,
:headers {"sec-fetch-site" "none", "host" "localhost:3000", "user-agent" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0", "cookie" "_ga=GA1.1.1518985717.1625000600; JSESSIONID=koI9O9huP2PEfiOrOqNLZ-C10RIYjUkJMotSN8Ua", "sec-fetch-user" "?1", "connection" "keep-alive", "upgrade-insecure-requests" "1", "accept" "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", "accept-language" "en-US,en;q=0.5", "sec-fetch-dest" "document", "accept-encoding" "gzip, deflate, br", "sec-fetch-mode" "navigate", "dnt" "1"},
:server-port 3000, :content-length -1,
:form-params {},
:websocket? false,
:server-exchange #object[io.undertow.server.HttpServerExchange 0x3ba07ab "HttpServerExchange{ GET /test2}"],
:query-params {},
:content-type nil,
:character-encoding "ISO-8859-1",
:context "",
:uri "/test2",
:server-name "localhost",
:query-string nil,
:path-params {},
:body #object[io.undertow.io.UndertowInputStream 0x5aee5fbd "io.undertow.io.UndertowInputStream@5aee5fbd"],
:multipart-params {},
:scheme :http,
:request-method :get,
:session nil}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment