Skip to content

Provide tonic::Request::get_timeout() #2220

Open
@snprajwal

Description

@snprajwal

Feature Request

We provide a set_timeout() method on tonic::Request, that sets the grpc-timeout header. It would naturally make sense to also provide a get_timeout() method, instead of requiring the user to do request.metadata().get("grpc-timeout") and processing the string into a std::time::Duration object manually.

Motivation

This just makes the API more consistent. I'm happy to open the PR if this will be accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions