Dim xPoslatUmo As String = ConfigurationManager.AppSettings.Item("UMOPoslat") If xPoslatUmo = "Ano" Then Dim request As WebRequest = WebRequest.Create(ConfigurationManager.AppSettings.Item("UMOServer")) request.Method = "POST" Dim postdata As String = "{""GENCELEK"":""SAS_CALLC""},{""GENMSGTEXT"":""info""},{""Volat"":" + xvolat + "},{""Stav"":""" + xstav + "},{""Info"":""" + Left(xinfo, 255) + "}" Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postdata) request.ContentType = "application/x-www-form-urlencoded" request.ContentLength = byteArray.Length Dim dataStream As Stream = request.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim response As WebResponse = request.GetResponse() mlog.LogujKontroly(postdata) mlog.LogujKontroly("Poslani UMO " + (CType(response, HttpWebResponse)).StatusDescription) response.Close() Else mlog.LogujKontroly("Poslani UMO - je nastaveno neposilat") End If
postdata
application/x-www-form-urlencoded
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)