static S loadPageWithUserAgentAndTimeout(S url, S userAgent, int timeout) ctex { URL tURL = new URL(url); URLConnection conn = tURL.openConnection(); conn.setRequestProperty("User-Agent", userAgent); loadPage_anonymous = true; print("loadPage timeout=" + timeout); ret loadPage(setURLConnectionTimeouts(conn, timeout), tURL); } sS loadPageWithUserAgentAndTimeout(S url, S userAgent, double timeout) { ret loadPageWithUserAgentAndTimeout(url, userAgent, (int) fromSeconds(timeout)); }
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: | 668 / 652 |
Version history: | 2 change(s) |
Referenced in: | [show references] |