pedestal

    2熱度

    1回答

    我製作了最簡單的Pedestal項目,並在本地執行了我的repl項目。然而,在localhost:8890檢查瀏覽器後,我看到了 (替換字符),而不是我放入Pedestal路徑中的實際文本(西里爾文符號)。 我也檢查過瀏覽器devtools響應標頭: 內容類型:text/html; charset = utf-8存在。 之前你問: 是的,我在響應設置charset=UTF-8,你可以在下面的代碼看

    1熱度

    1回答

    我想爲Pedestal網絡服務編寫測試。 如果我有: (defn pong [request] (ring-resp/response "pong")) (defroutes routes[[["/" {:get pong}]]]) 我怎麼會寫一個測試? (deftest alive-system (testing "ping-pong route"

    1熱度

    1回答

    如何將基座路線結合起來? (defroutes api-routes [...]) (defroutes site-routes [...]) (combine-routes api-routes site-routes) ;; should be a valid route as well 注意:這是一個與Combining routes in Compojure類似的問題,但對於Ped

    0熱度

    1回答

    我使用Pedestal(pedestal.io)並在開發中從repl中運行服務器。 當我更改應用程序代碼(如更改html模板)時,如何讓repl在保存文件時自動反映這些更改,並讓它們在瀏覽器刷新時顯示?

    1熱度

    2回答

    我已經發布的數據至基座的終點「/我-後我已經排到那個終點爲這樣: [[["/" {:get landing} ^:interceptors [(body-params/body-params) ...] ["/my-post {:post mypost-handler} .... 所以,在我看來這種手段。身體-PARAMS攔截器會火/ mypost太 在mypost處理程序

    1熱度

    1回答

    我創建打算具有以下資源的玩具立柱服務: / /movies /movies/today /movies/:iso-date其中:iso-date比賽#### - #### 最後一條路線的約束用下面的代碼片段定義: ^:constraints {:iso-date #"\d{4}-\d{2}-\d{2}"} 每當包含此約束的路徑出現在路由表中,我無法得到它的兄弟姐妹路線/movies/today

    1熱度

    1回答

    如何將URL參數獲取到Pedestal中的請求映射中?我假設這需要使用攔截器?然而,Pedestal文檔(或嚴重缺乏)並不能完全清楚這一點。謝謝。

    0熱度

    1回答

    我在Pedestal(http://www.rkn.io/2014/08/01/async-interceptors/)上關注這個博客文章,它引用了io.pedestal.interceptor - > defbefore。使用最新的Pedestal這個函數/宏不存在。它變成了什麼?謝謝。

    2熱度

    2回答

    當我嘗試從cljs應用程序(運行在http://localhost:3000上)向我的Pedestal服務器(在http://localhost:8080上運行)請求資源時,低於錯誤。我想,讓CORS從http://localhost:3000: XMLHttpRequest cannot load http://localhost:8080/db/query. Response to prefl

    2熱度

    2回答

    我下面的pedestal tutorial共享,我注意到了^shared註釋中的代碼,如下圖所示: (ns ^:shared tutorial-client.behavior (:require [clojure.string :as string] [io.pedestal.app.messages :as msg])) 這是什麼有用?