title: Read metadata in grpc on the server side c#
body: <p>I am sending token in metadata from the client side </p>
  
  <pre><code>      Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure);
    ItemQuery item = new ItemQuery() { Id = "abc" };
    var client = new MyService.MyServiceClient(channel);
    Metadata data = new Metadata
    {
      { "token", "Bearer xhrttt" }
    };
    var reply = client.GetItem(item, data);
  </code></pre>
  
  <p>But not able to find a way to fetch it in server side, Any help is appreciated</p>
  
  <p>below is an example of how my server-side code looks(i tried certain other ways also)</p>
  
  <pre><code>public override Task&lt;ItemResponse&gt; GetItem(ItemQuery request , ServerCallContext context)
      {
          try
          {
              var a = context.RequestHeaders["token"]; // not working 
              ItemResponse itmRes = new ItemResponse();
              if (request.Id == "foo")
              {
                  itmRes.Items.Add(new Item() { Id = "foo", Name = "foobar" });
              }
              return Task.FromResult(itmRes);
          }
          catch(Exception ex)
          {
              Console.WriteLine(ex.ToString());
          }
          return null;
      }
  </code></pre>