MCPcopy Create free account
hub / github.com/bcvgh/daydayEXP / getResponse

Method getResponse

src/main/java/com/bcvgh/utils/HttpTools.java:129–143  ·  view source on GitHub ↗
(HttpURLConnection conn, String encoding)

Source from the content-addressed store, hash-verified

127 }
128
129 private static Response getResponse(HttpURLConnection conn, String encoding) {
130 Response response = new Response(0, (String)null, (String)null, (String)null);
131
132 try {
133 conn.connect();
134 response.setCode(conn.getResponseCode());
135 response.setHead(conn.getHeaderFields().toString());
136 response.setText(streamToString(conn.getInputStream(), encoding));
137 } catch (IOException var3) {
138 response.setError(var3.toString());
139 LOGGER.debug(var3.toString());
140 }
141
142 return response;
143 }
144
145 private static HttpURLConnection getCoon(String url) throws IOException, NoSuchProviderException, NoSuchAlgorithmException, KeyManagementException {
146 SSLContext sslcontext = SSLContext.getInstance("SSL", "SunJSSE");

Callers 2

getMethod · 0.95
postMethod · 0.95

Calls 6

setCodeMethod · 0.95
setHeadMethod · 0.95
setTextMethod · 0.95
streamToStringMethod · 0.95
setErrorMethod · 0.95
toStringMethod · 0.80

Tested by

no test coverage detected