Hi all,
I have someone who's trying to POST some xml data to me using VBscript, which I'm totally unfamiliar with.
This is his code, more or less:
Dim postData As String = String.Empty
postData &= [xml code comes here]
Try Dim _encoding As New ASCIIEncoding Dim _data As Byte() = _encoding.GetBytes(_postData) ' Prepare web request... Dim _myRequest As HttpWebRequest _myRequest = CType(WebRequest.Create(" destination URL"), HttpWebRequest) _myRequest.Method = "POST" _myRequest.ContentType = "text/plain" _myRequest.ContentLength = _data.Length Dim _stream As System.IO.Stream = _myRequest.GetRequestStream _stream.Write(_data, 0, _data.Length) _stream.Close()
Now my question is - do I need to do anything special to decode the data? Or does the following work:
$xml_data = $POST['data'];
Thanks in advance to anyone who can help me with this.