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

feat(tonic): add Request and Response extensions #642

Merged
merged 2 commits into from
May 13, 2021
Merged

Commits on May 13, 2021

  1. feat(tonic): add Request and Response extensions

    Adds `tonic::Extensions` which is a newtype around `http::Extensions`.
    
    Request extensions can be set by interceptors with
    `Request::extensions_mut` and retrieved from RPCs with
    `Request::extensions`. Extensions can also be set in tower middleware
    and will be carried through to the RPC.
    
    Since response extensions cannot be set by interceptors the main use
    case is to set them in RPCs and retrieve them in tower middlewares.
    Figured that might be useful.
    
    Fixes #255
    davidpdrsn committed May 13, 2021
    Configuration menu
    Copy the full SHA
    afcb662 View commit details
    Browse the repository at this point in the history
  2. Address review feedback

    davidpdrsn committed May 13, 2021
    Configuration menu
    Copy the full SHA
    e1a73a1 View commit details
    Browse the repository at this point in the history