title: Sending HTTP requests via VB or VBA, increasing max size of post sendable
body: <p>I am writing with VB 6.0 (yes, that early version) and am using "WinHttp.WinHttpRequest.5.1" to post data to a URL. </p>
  
  <p>I noticed that data beyond the size 64K gets truncated. </p>
  
  <p>Is there a way to increase that limit on the sender side. How can i do it in VBA/VB 6.0.</p>
  
  <p>thank you,</p>
  
  <p>Dan</p>
  
  <p>p.s. I read that in php one can increase that size to tens of MB with a simple setting -- can this be done in VB as well.</p>
  
  <p>Edit:</p>
  
  <p>Here is some sample code:</p>
  
  <p>I added "Contents-Length" after i posed the question, after noticing this on the web, related to multi-part messages,  but its unclear to me if this works. The server still echos' back a truncated "payload" in the result.</p>
  
  <pre><code>Dim objWinHttp As Variant
  Set objWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
  
  Dim url As String
  url = "https://destination.com/api/v1/destination1
  
  objWinHttp.Open "post", url, False
  
  objWinHttp.setRequestHeader "Content-type", "application/json"
  objWinHttp.setRequestHeader "Content-Length", Len(json)
  objWinHttp.send json
  
  Dim result As String
  result = = objWinHttp.responseText
  </code></pre>