P
Philippe Schnyder
Hi
I'm doing one of my first VB.net app for WM5 and I'm stuck with
following problem: I'd like to have my app to do a HTTP(S) Post
Request with the following properties (as it was as an HTML File):
<form method="Post" action="https://privateserver/cgi-bin/sms/
send.pl">
<input name="username" type="hidden" value="myusername">
<input name="password" type="hidden" value="mypassword"
<input type="hidden" name="originator" value="phonenumber">
<input type="hidden" name="action" value="sendsms"></p>
<input name="number" type="text" value="now from a textbox in my VB
app">
<textarea name="message" value="too a textbox"></textarea>
<input type="submit" value="Send">
</form>
Those data need to be sended urlencoded in encoding latin1 (=
iso-8859-1)
I introduced System.Net.HTTPWebRequest:
Dim SendSMS As System.Net.HttpWebRequest =
System.Net.HttpWebRequest.Create("https://ndev9.ethz.ch/cgi-bin/sms/
send.pl/send.pl")
SendSMS.Method = "POST"
SendSMS.SendChunked = True
SendSMS.ContentType = "application/x-www-form-urlencoded"
but I've no idea where to pass the parameters and how to handle HTTP
answer?
Thank you for your time
Philippe
I'm doing one of my first VB.net app for WM5 and I'm stuck with
following problem: I'd like to have my app to do a HTTP(S) Post
Request with the following properties (as it was as an HTML File):
<form method="Post" action="https://privateserver/cgi-bin/sms/
send.pl">
<input name="username" type="hidden" value="myusername">
<input name="password" type="hidden" value="mypassword"
<input type="hidden" name="originator" value="phonenumber">
<input type="hidden" name="action" value="sendsms"></p>
<input name="number" type="text" value="now from a textbox in my VB
app">
<textarea name="message" value="too a textbox"></textarea>
<input type="submit" value="Send">
</form>
Those data need to be sended urlencoded in encoding latin1 (=
iso-8859-1)
I introduced System.Net.HTTPWebRequest:
Dim SendSMS As System.Net.HttpWebRequest =
System.Net.HttpWebRequest.Create("https://ndev9.ethz.ch/cgi-bin/sms/
send.pl/send.pl")
SendSMS.Method = "POST"
SendSMS.SendChunked = True
SendSMS.ContentType = "application/x-www-form-urlencoded"
but I've no idea where to pass the parameters and how to handle HTTP
answer?
Thank you for your time
Philippe