I am trying to send HTTP post through VBA. Here is my part of code
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.Open "POST", url, False
objHTTP.setRequestHeader "User-Agent", "EPS 1.0"
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.setRequestHeader "content", postString
objHTTP.setRequestHeader "Content-Length", Len(postString)
objHTTP.send
The problem is, the code is working only if the postString
is less than 65535
characters. If it exceeds 65535
characters, it throws error on below line:
ERROR: Incorrect parameter
objHTTP.setRequestHeader "content", postString
Any ideas about this? Do I need to set any other parameter to make it work around?