P
Peter Lapic
The following function returns a stream in text as a result of a URL I pass.
The problem I have is if a URL returns a client side post (see example
below) I want to be able to pass this stream back and have returned another
stream which is the result of that post.
I am just not sure how to handle this type of posting.
Regards
Peter Lapic
Function StreamHTMLContent(ByVal xURL As String)
Dim oStream As Stream
Dim oURLRequest As HttpWebRequest
Dim oURLResponse As HttpWebResponse
Try
oURLRequest = WebRequest.Create(xURL)
oURLResponse = oURLRequest.GetResponse()
oStream = oURLResponse.GetResponseStream()
Return New StreamReader(oStream).ReadToEnd()
Catch oException As Exception
Return oException.Message
End Try
End Function
==============================================================
<html>
<head>
<title>Sample</title>
</head>
<body>
<script language="JavaScript">
function submitForm(){
document.content.submit();
}
</script>
<form name="content" action=http://www.test.com.au/test.asp method="POST"">
11
<input type="hidden" name="Sa_waybill_list" value="5916803486">
<i>Please wait, getting POD information for <B>"5916803486"</b></i>
<BR><BR><BR>
<input type="hidden" name="retainwaybills" value="true">
<input type="hidden" name="Sa_database" value="ACTIVE">
<input type="hidden" name="Sa_screen" value="trakmain">
<input type="hidden" name="Sa_language" value="E">
<input type="hidden" name="SaFormName"
value="SeeMyShipments__Ftrakmain_htm">
<input type="hidden" name="Sa_waybill_ref_radio" value="waybill">
<input type="hidden" name="Sa_waybill_piece_nbr" value="5916803486">
<input type="hidden" name="Sa_current_waybill_nbr" value="5916803486">
<input type="hidden" name="Sa_IPEC" value="1">
<input type="hidden" name="Sa_account_nbr" value="ADMIN">
<BR>
<input type="hidden" name="B1" value="Proof of Delivery">
<script language="JavaScript">
document.content.submit();
</script>
</form>
</body>
</html>
The problem I have is if a URL returns a client side post (see example
below) I want to be able to pass this stream back and have returned another
stream which is the result of that post.
I am just not sure how to handle this type of posting.
Regards
Peter Lapic
Function StreamHTMLContent(ByVal xURL As String)
Dim oStream As Stream
Dim oURLRequest As HttpWebRequest
Dim oURLResponse As HttpWebResponse
Try
oURLRequest = WebRequest.Create(xURL)
oURLResponse = oURLRequest.GetResponse()
oStream = oURLResponse.GetResponseStream()
Return New StreamReader(oStream).ReadToEnd()
Catch oException As Exception
Return oException.Message
End Try
End Function
==============================================================
<html>
<head>
<title>Sample</title>
</head>
<body>
<script language="JavaScript">
function submitForm(){
document.content.submit();
}
</script>
<form name="content" action=http://www.test.com.au/test.asp method="POST"">
11
<input type="hidden" name="Sa_waybill_list" value="5916803486">
<i>Please wait, getting POD information for <B>"5916803486"</b></i>
<BR><BR><BR>
<input type="hidden" name="retainwaybills" value="true">
<input type="hidden" name="Sa_database" value="ACTIVE">
<input type="hidden" name="Sa_screen" value="trakmain">
<input type="hidden" name="Sa_language" value="E">
<input type="hidden" name="SaFormName"
value="SeeMyShipments__Ftrakmain_htm">
<input type="hidden" name="Sa_waybill_ref_radio" value="waybill">
<input type="hidden" name="Sa_waybill_piece_nbr" value="5916803486">
<input type="hidden" name="Sa_current_waybill_nbr" value="5916803486">
<input type="hidden" name="Sa_IPEC" value="1">
<input type="hidden" name="Sa_account_nbr" value="ADMIN">
<BR>
<input type="hidden" name="B1" value="Proof of Delivery">
<script language="JavaScript">
document.content.submit();
</script>
</form>
</body>
</html>