title: Bad Request from WCF Service using httpclient postAsJsonAsync
body: <p>Following is the my wcf service.</p>
  
  <pre><code>  public ApiResponseWrapper&lt;TextBlobModel&gt; PostText(string sessionId, string profileId, TextBlobModel txtModel)
      {}
  </code></pre>
  
  <p>Interface part for this is </p>
  
  <pre><code> [OperationContract]
      [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "session/{sessionId}/profile/{profileId}/text")]
      ApiResponseWrapper&lt;TextBlobModel&gt; PostText(string sessionId, string profileId, TextBlobModel txtModel);
  </code></pre>
  
  <p>And Model is </p>
  
  <pre><code> [DataContract]
  public class TextBlobModel
  {
      [DataMember]
      public string text { get; set; }
  
     [DataMember]
      public DateTime receivedTime { get; set; }
  }
  </code></pre>
  
  <p>When i called above service by following way i always get Bad Request Error.</p>
  
  <pre><code>          var baseApiUrl = "http://localhost:51398/api.svc/";
             HttpClient authClient = new HttpClient();
             authClient.BaseAddress = new Uri(baseoAuthApiUrl);
             apiClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
  
             var txtModel = new TextBlobModel();
             txtModel.text = "Hello How are you";
             txtModel.receivedTime = DateTime.Now;
  
              HttpResponseMessage txtResponse = apiClient.PostAsJsonAsync(String.Format("session/{0}/profile/{1}/text", "sessionId", "profileId"), txtModel).Result;
              var txtData = txtResponse.Content.ReadAsAsync&lt;RootObject&gt;().Result;
  </code></pre>
  
  <p>See following image.</p>
  
  <p><img src="https://i.stack.imgur.com/maf74.png" alt="enter image description here"></p>
  
  <p>Can you please suggest what i am doing wrong here?</p>