/*** Get Request Method ** @ param username * @ param password * @ return null indicates that the obtained path is incorrect, text returns the request data */public static String getRequest (String username, String password) {try {String path = "http: // 172.22.64.156: 8080/0001 AndroidWebService/LoginServlet? Username = "+ URLEncoder. encode (username) + "& password =" + URLEncoder. encode (password); URL url = new URL (path); HttpURLConnection conn = (HttpURLConnection) url. openConnection (); conn. setreadtimeouts (500); conn. setRequestMethod ("GET"); int code = conn. getResponseCode (); if (code = 200) {// The request is successful. InputStream is = conn. getInputStream (); String text = StreamUtil. readStream (is); return text;} else {// return null for request failure;} catch (Exception e) {e. printStackTrace ();} return null ;}