Skip to content

getRequest returns Request_String instead of Request a #1

@igstan

Description

@igstan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions