FormUrlEncodedContent works but StringContent does not
<p>I have a question about those 2 httpcontents.</p>

<p>I've made an webapi (php), copy from this: <a href="http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html" rel="nofollow">http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html</a>
I re-used the Rest.inc.php, and implement my own api file.</p>

<p>I try to call this api from .Net (I'm a .Net developer) - a simple WinForm Application - the FormUrlEncodedContent works but the StringContent does not.
This my code:</p>

<pre><code>Dictionary&lt;string, string&gt; parameters = new Dictionary&lt;string, string&gt;();
        parameters.Add("username", username);
        parameters.Add("title", title);
        parameters.Add("text", text);
        var jsonString = JsonConvert.SerializeObject(parameters);
        var content = new StringContent(jsonString, Encoding.UTF8, "text/json");
        //var content = new FormUrlEncodedContent(parameters);
        PostData(url, content);
</code></pre>

<p>And the reason why I want to use StringContent: in the real data, sometime the parameters will contain a byte[] (photo), and the FormUrlEncodedContent can't handle it</p>

<p>Please help me
Thanks alot!</p>