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

support google.api.HttpBody #457

Closed
theRealWardo opened this issue Sep 10, 2017 · 1 comment
Closed

support google.api.HttpBody #457

theRealWardo opened this issue Sep 10, 2017 · 1 comment

Comments

@theRealWardo
Copy link
Contributor

I'd like my gateway to understand that I'm returning a google.api.HttpBody proto that should be the actual HTTP body of the response.

this ended up not being so easy because of the way the Content-Type handling is being done now. In order to do this properly, the following diff is necessary:

-       // ContentType returns the Content-Type which this marshaler is responsible for.
-       ContentType() string
+       // ContentType returns the response Content-Type for "v".
+       ContentType(v interface{}) string

further, in order to do this I'd propose a new Marshaler that wraps the current JSONPb Marshaler. the new Marshaler would be the new default as well as I believe most users want this behavior. does this seem reasonable?

@achew22
Copy link
Collaborator

achew22 commented Dec 14, 2017

I'm going to consolidate this into just the PR #458

@achew22 achew22 closed this as completed Dec 14, 2017
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

2 participants