haskell / haskell/HTTP

getRequest returns Request_String instead of Request a

オープン
#1 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Haskell
スター
186
フォーク
59
PR マージ指標
30日以内にマージされた PR はありません

説明

What's the reason for not having `getRequest` and `postRequest` return `Request a`, i.e.:

```
getRequest :: BufferType a => String -> Request a
postRequest :: BufferType a => String -> Request a
```

If they were like this, it would be much easier to tell the library to use (Lazy) ByteStrings instead of Strings. The simplest way I could do that with what's in the library at this point is this:

```
request :: URI -> IO ByteString
request url = simpleHTTP (defaultGETRequest_ url) >>= getResponseBody
```

While it's not necessarily ugly or bad, I think it would be much nicer to have polymorphic `getRequest`/`postRequest` functions.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず getRequest、postRequest、Request、BufferType の定義と使用箇所を見つけ、defaultGETRequest_ および issue 内の request の例と比較します。提案されている多相シグネチャが既存の API に適合するかを判断し、互換性とテストに関する要件を特定します。完了とは、request ヘルパーが意図された buffer 型をサポートし、現在の String の使用を壊さないことを意味します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
haskell
領域
networking
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。