Content-Type URLConnection
I need to set my content type to be XML. I used the following:
HttpURLConnection urlConn = null;
URL u = new URL( url );
urlConn = (HttpURLConnection)u.openConnection();
urlConn.setDoOutput( true );
urlConn.setDoInput( true );
urlConn.setRequestMethod("POST");
urlConn.setRequestProperty("Content-Type","text/xml");
Why then does urlConn.getContentType() return text/html;charset=ISO-8859-1?
Liz

