title: Saving POST binary data with ADODB.Stream
body: <p>Another website sends me data with the POST method.</p>
  
  <p>I would like to take this data and insert it into the database.</p>
  
  <p>After some research online, I concluded that ADODB.Stream should do the job for me.</p>
  
  <p>I dont have problem with getting the binary data with <code>Request.TotalBytes</code>.
  With the following code, I am not receiving an error but it does not save the data either. So I must be doing something wrong with the ADODB Stream.</p>
  
  <pre><code>    tot_bytes = Request.TotalBytes
  
      Set BinaryStream = CreateObject("ADODB.Stream")
      BinaryStream.Mode = 3
      BinaryStream.Type = 1
      BinaryStream.Open       
      gBinaryData = BinaryStream.Write(tot_bytes) 
      BinaryStream.Close
      Set BinaryStream = Nothing
  
      SQL = "INSERT INTO STATUSES (StatusMessage, StatusDateEntered) VALUES ('"&amp; gBinaryData &amp;"', '"&amp; FormatDateMySQL(NOW) &amp;"')"                                  
      Set objAddC = objConn.execute(SQL)
  </code></pre>
  
  <p>.</p>
  
  <pre><code>Following a successful subscription, Facebook will proceed to call your endpoint every time that there are changes (to the chosen fields or connections). For each update, it will make an HTTP POST request.
  
  The request will have content type of application/json and the body will comprise a JSON-encoded string containing one or more changes.
  
  Note for PHP developers: In PHP, to get the encoded data you would use the following code:
  
  $data = file_get_contents("php://input");
  $json = json_decode($data);
  </code></pre>