Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getRequest returns Request_String instead of Request a #1

Open
igstan opened this issue Nov 19, 2010 · 0 comments
Open

getRequest returns Request_String instead of Request a #1

igstan opened this issue Nov 19, 2010 · 0 comments

Comments

@igstan
Copy link

igstan commented Nov 19, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant