Check status code
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
ac0d7ffe72
commit
ec8cbe7d74
@ -138,10 +138,13 @@ public class sigPlace {
|
||||
if (matches>=EXPECTED_MATCHES&&!submitted) {
|
||||
System.out.println("Data is reasonable, prepare for submitting...");
|
||||
POSTRequest postRes = new POSTRequest("http://"+args[1]+"/uploadform.html",temp);
|
||||
if (((HttpResponse<String>)postRes.run()).statusCode()==200) {
|
||||
HttpResponse<String> res = ((HttpResponse<String>)postRes.run());
|
||||
if (res.statusCode()==200) {
|
||||
playSound(Paths.get("ding.wav"));
|
||||
System.out.println("Successful!");
|
||||
submitted=true;
|
||||
} else {
|
||||
System.out.println("Got status code "+res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user