title: Post JSON on URL HTTP Web Request with VB.NET
body: <p>I am using an online NLP API called Wit.ai. I am sending an http web request, and I get a response, and that all works perfectly fine. However, now I need to know how to POST this JSON:</p>
  
  <pre><code> {
     "state": "email_or_text"
   }
  </code></pre>
  
  <p>As an addition to this code:</p>
  
  <pre><code> Function getJson()
      Dim editedText As String = TextBox1.Text.Replace(" ", "%20")
      Dim myHttpWebRequest = CType(WebRequest.Create("https://api.wit.ai/message?v=20140609&amp;q=" + editedText + "&amp;units=metric"), HttpWebRequest)
      myHttpWebRequest.Headers.Add("Authorization: Bearer &lt;myauthcode&gt;")
      Dim myHttpWebResponse = CType(myHttpWebRequest.GetResponse(), HttpWebResponse)
      Dim myWebSource As New StreamReader(myHttpWebResponse.GetResponseStream())
      Dim myPageSource As String = myWebSource.ReadToEnd()
      Return myPageSource
  End Function
  </code></pre>
  
  <p>Thanks for your help!</p>