dcsimg
Sending a POST request using the java.net.URLConnection class
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aliasgar_Muchhala
Posted On:   Tuesday, July 30, 2002 04:35 PM

Hi, I have a java applet that posts requests to a URL (an ASP or an ISAPI DLL) on the web server. I am using the "java.net.URLConnection" class to achieve this. And it works perfectly fine on Windows. However, if i run the same applet on a netscape brower running on macintosh (with an MRJ plugin), it seens to be sending a GET request instead of the POST. My question is, is there a way to specify the Request method using the URLConnection class? i have tried calling the setRequestProperty("METHOD","POST") method, but it didnt work. Can you please help. P.S. I know that the java.net.HttpURLConnection class does let me specify the method, but will this class work over https sites as well?    More>>

Hi,

I have a java applet that posts requests to a URL (an ASP or an ISAPI DLL) on the web server. I am using the "java.net.URLConnection" class to achieve this. And it works perfectly fine on Windows. However, if i run the same applet on a netscape brower running on macintosh (with an MRJ plugin), it seens to be sending a GET request instead of the POST.


My question is, is there a way to specify the Request method using the URLConnection class? i have tried calling the setRequestProperty("METHOD","POST") method, but it didnt work. Can you please help.


P.S. I know that the java.net.HttpURLConnection class does let me specify the method, but will this class work over https sites as well?

THanks and Regards,
--Aliasgar M.--

   <<Less

Re: Sending a POST request using the java.net.URLConnection class

Posted By:   Gautam_Marwaha  
Posted On:   Tuesday, July 30, 2002 09:46 PM

HttpURLConnection has a setRequestMethod which you can set to "POST".

Regd. HTTPS, it shd work fine with some additional code and JSSE jar files installed.
About | Sitemap | Contact