-
-
Save evsapi/2699231 to your computer and use it in GitHub Desktop.
IDrive - EVS - REST API - getServerAddress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String params="uid="+user+"&pwd="+pass; | |
| URL evsURL = new URL("https://evs.idrive.com/evs/getServerAddress"); | |
| 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 dout = new DataOutputStream (con.getOutputStream ()); | |
| dout.writeBytes(params); | |
| dout.flush(); | |
| dout.close(); | |
| BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); | |
| while((str = in.readLine()) != null){ | |
| result += str; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment