title: populating header for grpc java client request
body: <p>I am not using CallCredentials as of now with GRPC-Java.  I need to pass in multiple fields in the headers for certain calls.  I have populated the headers as given below and added an interceptor which gets called upon while using an async Stub/channel.  </p>
  
  <p><strong>populate header</strong>    </p>
  
  <pre><code>public Metadata generateHeader() {
      Metadata.Key&lt;String&gt; jwtKey = Metadata.Key.of("jwt", Metadata.ASCII_STRING_MARSHALLER);
      headers.put(jwtKey, jwt);
      Metadata.Key&lt;String&gt; testKey = Metadata.Key.of("testID", Metadata.ASCII_STRING_MARSHALLER);
      headers.put(testKey, testID);
      return headers;
  } 
  </code></pre>
  
  <p>I am accessing the headers field as an instance variable passed into the client interceptor.  I can see that the headers contains the intended value till it gets into the start call at which point it becomes null (I obviously do not see the headers populated on the server side).  Any ideas to fix this (or should i be using CallCredentials).  Documentation for GRPC-Java needs a lot of work.  </p>
  
  <pre><code>@Override
  public &lt;ReqT, RespT&gt; ClientCall&lt;ReqT, RespT&gt; interceptCall(
          MethodDescriptor&lt;ReqT, RespT&gt; method,
          CallOptions callOptions,
          Channel next) {
      log.info("HEADER INTERCEPTOR{}", headers.get(Metadata.Key.of("jwt", Metadata.ASCII_STRING_MARSHALLER)));
      ClientCall&lt;ReqT, RespT&gt; call = next.newCall(method, callOptions);
      return new ForwardingClientCall.SimpleForwardingClientCall&lt;ReqT, RespT&gt;(call) {
          @Override
          public void start(ClientCall.Listener&lt;RespT&gt; responseListener, Metadata headers) {
              log.info("HEADER START {}", headers.keys());
              super.start(responseListener, headers);
          }
      };
  }  
  </code></pre>