1 | static S loadPageWithUserAgentAndTimeout(S url, S userAgent, int timeout) ctex { |
2 | URL tURL = new URL(url); |
3 | URLConnection conn = tURL.openConnection(); |
4 | conn.setRequestProperty("User-Agent", userAgent); |
5 | loadPage_anonymous = true; |
6 | print("loadPage timeout=" + timeout); |
7 | ret loadPage(setURLConnectionTimeouts(conn, timeout), tURL); |
8 | } |
9 | |
10 | sS loadPageWithUserAgentAndTimeout(S url, S userAgent, double timeout) { |
11 | ret loadPageWithUserAgentAndTimeout(url, userAgent, (int) fromSeconds(timeout)); |
12 | } |
Began life as a copy of #1004102
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1006314 |
Snippet name: | loadPageWithUserAgentAndTimeout |
Eternal ID of this version: | #1006314/3 |
Text MD5: | a4f721acad96f55b0b790c6f100c4f63 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-10 19:22:25 |
Source code size: | 511 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 670 / 654 |
Version history: | 2 change(s) |
Referenced in: | [show references] |