i'm using an HttpClient to create a HTTP request and that client comes from the assembly Windows.Web.Http

All is good when posting the request without the Content-Type Header but the server does not return what I need because it needs that header, so after finding the correct headers needed to be sent I'm facing another problem... I'm not being able to set the Content-Type header

Here is my code (where is the try block is where the error is)

```
using (var wp = new Windows.Web.Http.HttpClient())
            {

                HttpRequestMessage mSent = new HttpRequestMessage(HttpMethod.Post, new Uri(url));
                //mSent.Headers.Add("Host", "academicos.ubi.pt");
                //mSent.Headers.Add("Connection", "keep-alive");
                //mSent.Headers.Add("Content-Length", "18532");
                //mSent.Headers.Add("Origin", "https://academicos.ubi.pt");
                //mSent.Headers.Add("X-Requested-With", "XMLHttpRequest");
                //mSent.Headers.Add("Cache-Control", "no-cache");
                //mSent.Headers.Add("X-MicrosoftAjax", "Delta=True");
                mSent.Headers.Add("User-Agent", " Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36");
                try
                {
                    mSent.Content.Headers.ContentType = new Windows.Web.Http.Headers.HttpMediaTypeHeaderValue("application/x-www-form-urlencoded");
                }
                catch (Exception ex) { ex.ToString(); }
                //mSent.Headers.Add("Accept", "*/*");
                //mSent.Headers.Add("Referer", "https://academicos.ubi.pt/online/horarios.aspx");
                //mSent.Headers.Add("Accept-Encoding", "gzip,deflate");
                //mSent.Headers.Add("Accept-Language", "pt-PT,pt;q=0.8,en-US;q=0.6,en;q=0.4");
                mSent.Headers.Add("Cookie", "the cookie string is big, so I will not post it here");
                mSent.Content = new HttpStringContent("the content is well defined, but I will not post it here it's huge"), Windows.Storage.Streams.UnicodeEncoding.Utf8);

                HttpResponseMessage mReceived = await wp.SendRequestAsync(mSent, HttpCompletionOption.ResponseContentRead);

                if (mReceived.IsSuccessStatusCode)
                {
                    htmlPage = await mReceived.Content.ReadAsStringAsync();
                }
            }

```

The error that I'm recieving is Object reference not set to an instance of an object.
I tryied setting this header like I set the user agent it gives me another exception that says that to set the content type I need to set it under content headers...

Any Ideias? I tryied searching for answers for this problem, so far I came out empty handed