-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add body type getter in Convert trait #40
Labels
enhancement
New feature or request
Comments
That's a good point! It will also simplify the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Request and response bodies are converted to and from raw byte format using code specific to each body type that we support. In order to have modularity, though, converters are handled through a
Convert
trait. However, in order to correctly compose requests and responses, you explicitly need to know theBodyType
that you're using.Because the components doing the body conversion usually also create the request or response header (be it either in the service or in the client), it makes sense to be able to retrieve the
BodyType
straight from the converter, minimizing the risk of the two (body encoding type and encoding type identifier in the header) becoming inconsistent.The text was updated successfully, but these errors were encountered: