Skip to content

Exposing internal modules? #153

@saurabhnanda

Description

@saurabhnanda

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.

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)?

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