haskell / haskell/wreq

Exposing internal modules?

未关闭
#153 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Haskell
星标
381
派生
72
PR 合并指标
30 天内没有已合并 PR

描述

My app has the following exception type which is used to bail out from HTTP requests which returned something unexpected. There are many APIs in the wild that return a `200 ok` with a weird custom data structure in the response that indicates an error. The following type covers all such situations because it allows the raw response AND the raw request to be logged for debugging.

```haskell
data UnexpectedApiResponse = UnexpectedApiResponse String Request (Response BSL.ByteString)
```

HOWEVER, as a user of the `wreq` library the only way to get hold of the original `Request` is via the `prepareGet` and `preparePost` methods, which are inside hidden/internal modules.

Any thoughts on exposing these `Internal` modules (with a big fat warning, if required)?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。