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

Exposing internal modules? #153

Open
saurabhnanda opened this issue Jan 22, 2024 · 0 comments
Open

Exposing internal modules? #153

saurabhnanda opened this issue Jan 22, 2024 · 0 comments

Comments

@saurabhnanda
Copy link

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

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