build-request-map

ring.util.servlet

  • (build-request-map request)
Create the request map from the HttpServletRequest object.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source ring/util/servlet.clj:27 top

(defn build-request-map
  "Create the request map from the HttpServletRequest object."
  [#^HttpServletRequest request]
  {:server-port        (.getServerPort request)
   :server-name        (.getServerName request)
   :remote-addr        (.getRemoteAddr request)
   :uri                (.getRequestURI request)
   :query-string       (.getQueryString request)
   :scheme             (keyword (.getScheme request))
   :request-method     (keyword (.toLowerCase (.getMethod request)))
   :headers            (get-headers request)
   :content-type       (.getContentType request)
   :content-length     (get-content-length request)
   :character-encoding (.getCharacterEncoding request)
   :body               (.getInputStream request)})
Vars in ring.util.servlet/build-request-map: defn
Used in 0 other vars

Comments top

No comments for build-request-map. Log in to add a comment.