【发布时间】:2019-09-07 16:15:34
【问题描述】:
我想通过 GET 请求传递表单数据。
我在这个 curl 上取得了成功:
curl http://sample.com -d 'action=login_request&user_name=balvan'
但我需要从-d 传递同样的东西。使用此函数调用:
(http-client/request
{:url base-url
:method :get
:deadlock-guard? false
:insecure? true})
如何在请求正文中添加那些“-d”参数?
我在 ns 声明中有 [org.httpkit.client :as http-client],在项目的依赖项中有 [cheshire "5.8.1"]。
【问题讨论】:
-
检查 http-kit 的文档。很多例子。 http-kit.org/client.html