我怎样才能with-fake-http
拦截http/get
包含:query-params
. 以下代码产生异常
(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: 尝试在未注册的 URL localhost 上执行 GET,并且禁用了真正的 HTTP 请求。,编译:(web/db_test.clj:57:1)
谢谢你的帮助。