title: Setting content-encoding and content-type with Amazon API for .NET
body: <p>How can I set the S3 bucket file header to be the following:</p>
  
  <p>content-encoding: gzip
  content-type: text/css</p>
  
  <p>I am using Amazon API using the SDK for .NET. I am uploading a file to S3 using the PutObjectRequest. The problem that when the file is uploaded, the content type and content encoding headers aren't beign updated (I've checked via the files properties on Amazon Console).</p>
  
  <p>example:</p>
  
  <pre><code> request.AddHeader("expires", EXPIRES_DATE);
   request.AddHeader("content-encoding", "gzip");         
   request.ContentType = "text/css";
  </code></pre>
  
  <p>Also tried:</p>
  
  <pre><code>NameValueCollection metadata = new NameValueCollection();
  metadata.Add("content-type", "text/css");
  metadata.Add("content-encoding", "gzip");
  request.WithMetaData(metadata);
  </code></pre>
  
  <p>What I'm doing wrong?</p>