1

我看到有一个可能的函数可以getWith传递一个Option值。

然而,查找Option类型似乎在黑线鳕中显示的信息很少:在此处输入图像描述

我该如何设置这些?

4

1 回答 1

1

wreq 使用镜头,因此可以使用以下方法完成:

let opts = defaults
           & header "Content-Type" .~ ["application/json"]
getWith opts "http://localhost"

于 2020-07-27T12:23:35.510 回答