Conversation
…ers for stub delegation
There was a problem hiding this comment.
Code Review
This pull request updates ClientContext.java by changing the visibility of getInternalHeaders() and Builder.setInternalHeaders() from protected to public. Both methods are now annotated with @internalapi to restrict their usage to generated service stubs. I have no feedback to provide.
|
|
|
|
||
| protected abstract Builder setInternalHeaders(Map<String, String> headers); | ||
| @InternalApi("For use by generated service stubs only") | ||
| public abstract Builder setInternalHeaders(Map<String, String> headers); |
There was a problem hiding this comment.
I thought we were talking about external header providers such as getHeaderProvider, which we may want to copy from grpc transport to httptransport.
For internal headers, I don't think we want to expose the setters as public. We should be able to create default http internal headers using defaultHttpJsonApiClientHeaderProviderBuilder.
There was a problem hiding this comment.
Thanks - you are right here, thanks for pointing out the default builder. Closing this PR.



This will allow generated client library code using gRPC to forward internal headers like
x-goog-api-clientto HTTP requests made for resumable upload-enabled methods.