I have a problem when I try to send a Post Method!_NEWLINE_!...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Willie_Siavichay
Posted On:   Sunday, September 3, 2000 01:18 PM

I have a problem when I try to send a Post Method request through the web from my applet, I have to access a WebServer with Basic Authentication security . It works in PCs, but never in Macs. The code is ... try{ url = new URL(urlString); urlConn = url.openConnection(); urlConn.setDoOutput (true); urlConn.setDoInput (true); urlConn.setUseCaches (false); urlConn.setRequestProperty ("Authorization", "Basic " + encoding); urlConn.connect(); urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); out = new DataOutputStream(urlConn.getOutputStream());    More>>

I have a problem when I try to send a Post Method
request through the web from my applet, I have to access
a WebServer with Basic Authentication security .


It works in PCs, but never in Macs.

The code is


			
...
try{
url = new URL(urlString);
urlConn = url.openConnection();
urlConn.setDoOutput (true);
urlConn.setDoInput (true);
urlConn.setUseCaches (false);
urlConn.setRequestProperty ("Authorization", "Basic " + encoding);
urlConn.connect();
urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
out = new DataOutputStream(urlConn.getOutputStream());
out.writeBytes("data=Hello");
out.flush();
out.close();
in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
String inputLine;
inputLine = in.readLine();
in.close();
}catch (MalformedURLException e) {
}catch (IOException e){
}catch (Exception e){
}

How can I handle this in Mac?

   <<Less
About | Sitemap | Contact