rendered paste bodyprivate void getRequest() throws IOException { //xrhsimopoiw flag gia na ksexwrizw gia poia grammh ths aithshs anaferomai
String line;
int flag=1;
while ((line = readLine(clientIn)) != null ) {
if (line.length() == 0) { //DOKIMASTE TO KAI MIA ME AFTO TO IF SXOLIASMENO!
Request.append("\r\n");
break;
}
if (flag==1){
line1=line;//bazoume thn 1h grammh
flag=2;
Request.append(line + "\r\n");
continue;
}
else if (flag==2){
line2=line; //bazoume thn 2h grammh
flag=3;
Request.append(line + "\r\n");
continue;
}
else{
System.out.println("Diabasma ths upoloiphs aithshs!!");
Request.append(line + "\r\n");
}
}// kleinei to while
Request.append("\r\n");//auto ginetai se olh thn aithsh
}