HTTP authentication in J2ME
问题 I'm trying to create a J2ME app, which talks to webserver using HttpConnection connector. When I am talking to the WebServer, I have to authenticate using Basic HTTP auth, which normally goes like http://username:password@website.com/rest/api/method But in J2ME, when I construct a url of this form, it doesn't work. I also tried adding request property, hc = (HttpConnection) Connector.open(url); hc.setRequestProperty("User", "alagu"); hc.setRequestProperty("pass", "mypassword"); but didn't