   (if-let [^String type (:content-type request)]
     (.startsWith type "application/x-www-form-urlencoded")))
 
-(defn- assoc-form-params
+(defn assoc-form-params
   "Parse and assoc parameters from the request body with the request."
   [request encoding]
   (merge-with merge request

      (let [params (parse-params (slurp body :encoding encoding) encoding)]
        {:form-params params, :params params})
      {:form-params {}, :params {}})))

(defn wrap-params
  "Middleware to parse urlencoded parameters from the query string and form

                character encoding is set."
  [handler & [opts]]
  (fn [request]
    (-> request
        (params-request opts)
        handler)))
