kinlane
4/14/2012 - 5:47 PM

IDrive - EVS - REST API - accountValidate

IDrive - EVS - REST API - accountValidate

String params="uid="+user+"&pwd="+password;

try

{

URL evsURL = new URL("https://<server address>/evs/accountValidate");

HttpURLConnection con = (HttpURLConnection)evsURL.openConnection();

con.setRequestMethod("POST");

con.setRequestProperty("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");

con.setDoOutput(true);

con.setDoInput(true);

con.setUseCaches(false);

DataOutputStream out =  new DataOutputStream (con.getOutputStream ());

out.writeBytes(params);

out.flush();

out.close();

BufferedReader in  = new BufferedReader(new InputStreamReader(con.getInputStream()));

while((str = in.readLine()) != null)

{

result += str; 

}

}