title: http headers for c# client to Java Service
body: <p>Hi ive been trying to add http headers to a webclient in c# , ive been looking alot of places and have had little luck often people point to a Credentials class however i only have ClientCredentials my client also missing is a PreAuthenticate field?</p>
  
  <p>The service is written in Java and I can add http headers to that as follows</p>
  
  <pre><code>reqHeaders.put(HEADER_NAME_USERNAME, Collections.singletonList(USER_NAME));
  reqHeaders.put(HEADER_NAME_PASSWORD, Collections.singletonList(PASSWORD));
  ((BindingProvider) webWS).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS,reqHeaders);
  </code></pre>
  
  <p>However i have no idea how to do this in c# ive tried endpoint address builder, ClientCredential, windows.ClientCredential basically anywehre i can find a username and passsword
  When i make a request in java i capture the http packet in wireshark
  looks kinds like this</p>
  
  <pre><code>+hypertext transfer protocol
  +POST
    post stuff
   Password: mypass
   Username: username
   soapaction: ... and so on
  </code></pre>
  
  <p>i cant change the server side code all i know is if i can add two headers one called username and one password with values ill be Sheening (read:winning)</p>