I need to write a simple java function that takes a URL and processes the response which is in JavaScript, I tried using HttpUrlConnection, but it could not. Is there any java library for handling javascript response?
thanks.
EDIT: My code:
Url url = new url("https://login.live.com/oauth20_authorize.srf");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
BufferedReader reader = new BufferedReader( new InputStreamReader(url.openStream()));
while(reader.readLine()!=null){
System.out.println(reader.readLine());
Response:
<html dir="..... Windows Live ID requires JavaScript to sign in. This web browser either does not support JavaScript, or scripts are being blocked......<body onload="evt_LoginHostMobile_onload(event);">
But I want to read those javascript response. Is it possible in java?
I found the way, HtmlUnit does this, it can handle javascript response
Thanks all those negative raters …..