-
-
Notifications
You must be signed in to change notification settings - Fork 421
Description
We have an API type representing a 3rd-party API that we want to use with servant-client. Our response type definitions only implement a subset of the response from the API.
Now, we want to use the same servant API definition to fetch the (unparsed) raw data from the 3rd-party service to store in a database for archiving. Using the existing stuff in servant-client-core, is it possible to access the raw response, including headers, without having to replicate the HasClient machinery to change how Verbs are handled? We'd like to be able to write the standard genericClient // endpoint /: param and get the full response back (or at least the raw body).
We also considered building an alternative runRequestAcceptStatus to log the raw responses in addition to the standard behaviour, but this would cause client requests to fail if the response could not be parsed into the declared type, even though we don't need the parsed version.