title: HttpWebRequest, How to Send POST Data with Application/JSON Content-Type?
body: <pre>
  HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(url);
  request.Method = "POST";
  request.ContentType = "application/x-www-form-urlencoded; charset=utf-8";
  </pre>
  
  <p>POST data was send (I check using Fiddler) returned from Yahoo :</p>
  
  <p><b>{"error":{"code":-1003,"detail":"Unsupported Content Type Error","description":"Unsupported Content Type Error"},"code":-1003}
  </b></p>
  
  <p>I'm writing Yahoo Messanger client that require <b>application/json; charset=utf-8</b> as content type, and when I set :</p>
  
  <pre>
  request.ContentType = "application/json; charset=utf-8";
  </pre>
  
  <p>No POST data send, returned from Yahoo :</p>
  
  <p><b>{"error":{"code":-1005,"detail":"Invalid Argument Error","description":"Invalid Argument Error"},"code":-1005}</b></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I was try to send this 2 values via POST method : <strong>presenceState</strong> &amp; <strong>status</strong>.</p>
  
  <p>As stated in <a href="http://developer.yahoo.com/messenger/guide/ch02.html#toplevelsupportedcontenttypes" rel="noreferrer">Yahoo Messager IM API</a> supported <strong>content-type</strong> are <strong>application/json</strong>.
  And in my code, if I set <strong>content-type</strong> to <strong>application/json</strong>, <em>HttpWebRequest</em> didn't send those 2 values via POST.</p>