【发布时间】:2017-03-29 19:28:26
【问题描述】:
如何让with-fake-http 拦截包含:query-params 的http/get 请求。以下代码产生异常
(require
'[org.httpkit.client :as http]
'[org.httpkit.fake :refer :all]
)
(with-fake-http ["localhost?q=hello" "hello param"]
(println @(http/get "localhost" :query-params {:q "hello"})))
CompilerException java.lang.IllegalArgumentException: Attempted to perform GET on unregistered URL localhost and real HTTP requests are disabled., compile:(web/db_test.clj:57:1)
感谢您的帮助。
【问题讨论】: