1
我正在實現服務,我必須創建動態http發佈請求,我的代碼如下。如何在榆樹中創建動態http正文
postRequest: Int -> Http.Request
postRequest catId =
let
body =
"""{"categoryId:"""++catId++""","coupon":false,"domainId":1,"locations":[],"onlineMenu":false,"onlineOrder":false,"pageNo":1,"pageSize":10,"reservation":false,"searchText":"","subcategories":[]}"""
in
{ verb = "POST"
, headers =
[("Content-Type", "application/json")
]
, url = "http://xyz/businesses/list"
, body = Http.string body
}
,但我收到的一些錯誤 如何連接的CATID在身體和CATID爲整型。
請有人建議我在執行過程中做了什麼錯誤。
謝謝@Tosh的幫助! –