我想采用任意 http.Request 并將正文作為 json 字符串。我知道這涉及到 json 包,但它似乎json.Decode需要一個通過引用傳入的特定結構。如何解碼任意請求正文(然后將結果字符串化)?func RequestBodyJsonString(r *http.Request) string {}
- 1 回答
- 0 關注
- 156 瀏覽
添加回答
舉報
0/150
提交
取消