1

customMethod 使用https://hackage.haskell.org/package/wreq-0.5.2.1/docs/Network-Wreq.html#v:customMethod时如何设置请求正文?

postput接受主体的参数,但是没有这样的参数customMethod

4

1 回答 1

1

用于customPayloadMethod在具有可发布正文的请求上指定自定义方法。

customPayloadMethod :: Postable a => String -> String -> a -> IO (Response ByteString)

根据您的需要,还有一些其他变体:

customPayloadMethodWith :: Postable a => String -> Options -> String -> a -> IO (Response ByteString) Source#
customHistoriedPayloadMethod :: Postable a => String -> String -> a -> IO (HistoriedResponse ByteString) Source#
customHistoriedPayloadMethodWith :: Postable a => String -> Options -> String -> a -> IO (HistoriedResponse ByteString)
于 2018-03-12T18:44:41.897 回答