remove request
This commit is contained in:
parent
8f560f0f61
commit
f1f3fd75a2
1 changed files with 19 additions and 18 deletions
|
@ -21,25 +21,26 @@ class Threads1 implements Runnable {
|
||||||
public void run(){
|
public void run(){
|
||||||
try{
|
try{
|
||||||
result = result.concat("step 2\n");
|
result = result.concat("step 2\n");
|
||||||
URL url = new URL("https://alexmahr.de/word");
|
result = result.concat("SUPER\n");
|
||||||
result = result.concat("step 3\n");
|
//URL url = new URL("https://alexmahr.de/word");
|
||||||
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
|
//result = result.concat("step 3\n");
|
||||||
result = result.concat("step 4\n");
|
//HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
|
||||||
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
|
//result = result.concat("step 4\n");
|
||||||
result = result.concat("step 5\n");
|
//BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
|
||||||
String inputLine;
|
//result = result.concat("step 5\n");
|
||||||
StringBuffer response = new StringBuffer();
|
//String inputLine;
|
||||||
result = result.concat("step 6\n");
|
//StringBuffer response = new StringBuffer();
|
||||||
|
//result = result.concat("step 6\n");
|
||||||
|
|
||||||
while ((inputLine = in.readLine()) != null) {
|
//while ((inputLine = in.readLine()) != null) {
|
||||||
result = result.concat("step 7\n");
|
//result = result.concat("step 7\n");
|
||||||
response.append(inputLine);
|
//response.append(inputLine);
|
||||||
}
|
//}
|
||||||
result = result.concat("step 8\n");
|
//result = result.concat("step 8\n");
|
||||||
in.close();
|
//in.close();
|
||||||
result = result.concat("step 9\n");
|
//result = result.concat("step 9\n");
|
||||||
result = result.concat( "OK".concat(response.toString()));
|
//result = result.concat( "OK".concat(response.toString()));
|
||||||
urlConnection.disconnect();
|
//urlConnection.disconnect();
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
// throw new RuntimeException(e);
|
// throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue