Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

23
LINES

< > BotCompany Repo | #1009684 // Test getURLReturnCode

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (512L/4K/14K).

1  
!7
2  
3  
p {
4  
  testURL("http://ai1.lol");
5  
  testURL("http://www.web-woody-lab.de/010w_start.php");
6  
  testURL("http://ai1.lol/1008855/raw");
7  
  testURL("http://snippets.tinybrain.de");
8  
  testURL("http://tinybrain.de:8080/tb/snippets.php");
9  
}
10  
11  
static bool testURL(S url) {
12  
  print("Checking: " + url);
13  
  int code = getURLReturnCode(url);
14  
  S s = "";
15  
  bool ok = false;
16  
  if (code == 200) { s = " => OK"; ok = true; }
17  
  else {
18  
    s = " => ???";
19  
    printAndClearSilentException();
20  
  }
21  
  print("  Code: " + code + s);
22  
  ret ok;
23  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009684
Snippet name: Test getURLReturnCode
Eternal ID of this version: #1009684/3
Text MD5: 8249986a6d35d6ef33d0ae96f4bd78af
Transpilation MD5: c5e43b4f3d707d8d0184850a7a03b20b
Author: stefan
Category: javax / http
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-13 23:48:22
Source code size: 542 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 400 / 459
Version history: 2 change(s)
Referenced in: [show references]