title: Getting the value an Http Post Method returns
body: <p>I have a post method in my web api that returns a string and i am calling the method from a client. How do i get the value that is being returned.</p>
  
  <p><strong>Post Method</strong></p>
  
  <pre><code>    public String Post(Models.SQNotificationDataAccessRepository.NotificationEntry notificationEntry)
      {
          String externalReferenceID = String.Empty;
          if (notificationEntry == null)
          {
              throw new HttpResponseException(HttpStatusCode.BadRequest);
          }
  
          externalReferenceID= dbTransactionLayer.PopulateEsiTable(notification);
  
          return externalReferenceID;
      }
  </code></pre>
  
  <p><strong>Client</strong> </p>
  
  <pre><code>        using (var client = new HttpClient())
          {
              client.BaseAddress = new Uri("http://localhost:12819/");
              client.DefaultRequestHeaders.Accept.Clear();
              client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
  
  
              Notification notification = new Notification()
              {
                  id = 102,
                  To = new String[] { "jamesBond@yahoo.com", "cmsds@email.com" },
                  Title = "Notification WebService Client Test",
                  MessageBody = "The message body will go there",
                  DelieveryType = "Email",
                  Response = true
              };
  
  
  
              HttpResponseMessage response = await client.PostAsJsonAsync("api/NotificationEntry/Post",notification);
              var result = response;
  
              Console.WriteLine("Successfully delivered:" + result.ToString);
          }
  </code></pre>