Skip to content

Conversation

@evaogbe
Copy link
Contributor

@evaogbe evaogbe commented Nov 1, 2017

To update GAPIC to use routing headers, wrap_method needs to accept more metadata than just the user agent. Example:

metadata = [
    (b'x-google-request-params',
     b'name={}&book.read={}'.format(name, book.read))]

self._create_book(request, retry=retry, timeout=timeout, metadata=metadata)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 1, 2017
@theacodes
Copy link
Contributor

@eoogbe not to be obnoxious, but I have the exact same question about this change as I had with the (same? similar?) feature proposed in googleapis/gax-python#203

Why does this need to occur at wrap time as opposed to invocation time? Doing this at wrap time adds complexity to this layer but adding metadata at invocation time is a feature that already exists. It seems the rationale here is "routing headers" - won't those depend on the RPC request message which isn't known until invocation time?

@evaogbe
Copy link
Contributor Author

evaogbe commented Nov 2, 2017

@jonparrott I got a little confused at the api change. Can I specify metadata once the method is wrapped method?

@theacodes
Copy link
Contributor

theacodes commented Nov 2, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: core cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants