Missing form parameters in Compojure POST request

前端 未结 4 1691
北荒
北荒 2021-01-01 18:30

I\'m having problems getting the form parameters in the following Compojure example:

(ns hello-world
  (:use compojure.core, ring.adapter.jetty)
  (:require          


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 18:42

    Have you taken into account this:

    As of version 0.6.0, Compojure no longer adds default middleware to routes. This means you must explicitly add the wrap-params and wrap-cookies middleware to your routes.

    Source: https://github.com/weavejester/compojure

    I tried your example with my current setup and it worked. I have included the following: require [compojure.handler :as handler] and (handler/api routes).

提交回复
热议问题