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

5
LINES

< > BotCompany Repo | #1023704 // tryToReadErrorStreamFromURLConnection

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (1642L/11K).

1  
sS tryToReadErrorStreamFromURLConnection(URLConnection conn) null on error {
2  
  if (conn cast HttpURLConnection)
3  
    ret stream2string(conn.getErrorStream()); // TODO: ensure some max length
4  
  null;
5  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023704
Snippet name: tryToReadErrorStreamFromURLConnection
Eternal ID of this version: #1023704/2
Text MD5: 734bf6f6bb5c6cffca6017abff87d46e
Transpilation MD5: 67a4d8f77d02e36ce2bed7dcf4bbaf85
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-03 13:59:39
Source code size: 203 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 308 / 359
Version history: 1 change(s)
Referenced in: [show references]