- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for openConnection (0.23 sec)
-
mockwebserver-junit4/src/test/java/mockwebserver3/junit4/MockWebServerRuleTest.kt
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.5K bytes - Viewed (1) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
server.enqueue(MockResponse()) try { server.url("/a").toUrl().openConnection().getInputStream() fail<Any>() } catch (expected: IOException) { } server.url("/b").toUrl().openConnection().getInputStream() // Should succeed. } /** * Throttle the request body by sleeping 500ms after every 3 bytes. With a 6-byte request, this
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 21.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
server.enqueue(MockResponse()) try { server.url("/a").toUrl().openConnection().getInputStream() fail<Unit>() } catch (expected: IOException) { // Expected. } server.url("/b").toUrl().openConnection().getInputStream() // Should succeed. } @Test fun clearDispatcherQueue() { server.enqueue(MockResponse(body = "A"))
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 23.5K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt
return MockResponse() } } assertThat(requestsMade.size).isEqualTo(0) mockWebServer.dispatcher = dispatcher val url = mockWebServer.url("/").toUrl() val conn = url.openConnection() as HttpURLConnection conn.responseCode // Force the connection to hit the "server". // Make sure our dispatcher got the request. assertThat(requestsMade.size).isEqualTo(1) } @Test
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.3K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
} } @Test fun testUrlConnectionDirect() { testRequest { val url = URI(mockServer.endpoint + "/person?name=peter").toURL() val connection = url.openConnection() as HttpURLConnection assertThat(connection.inputStream.source().buffer().readUtf8()).contains("Peter the person") } } @Test fun testUrlConnectionPlaintextProxied() {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 5.9K bytes - Viewed (0) -
src/main/java/jcifs/smb1/http/Handler.java
return DEFAULT_HTTP_PORT; } protected URLConnection openConnection(URL url) throws IOException { url = new URL(url, url.toExternalForm(), getDefaultStreamHandler(url.getProtocol())); return new NtlmHttpURLConnection((HttpURLConnection) url.openConnection()); } private static URLStreamHandler getDefaultStreamHandler(String protocol)
Java - Registered: Sun Apr 21 00:10:10 GMT 2024 - Last Modified: Fri Mar 22 20:39:42 GMT 2019 - 6.1K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ResourceTraversalTest.java
final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class"; final URL classURL = ResourceUtil.getResource(classFilePath); final JarURLConnection con = (JarURLConnection) classURL.openConnection(); ResourceTraversalUtil.forEach(con.getJarFile(), (ResourceHandler) (path, is) -> { try { if (count < 10) { System.out.println(path); }
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 6K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ClassTraversalTest.java
final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class"; final URL classURL = ResourceUtil.getResource(classFilePath); final JarURLConnection con = (JarURLConnection) classURL.openConnection(); ClassTraversalUtil.forEach(con.getJarFile(), (ClassHandler) (packageName, shortClassName) -> { if (count < 10) { System.out.println(ClassUtil.concatName(packageName, shortClassName));
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 5.1K bytes - Viewed (0) -
src/main/java/jcifs/http/Handler.java
return DEFAULT_HTTP_PORT; } @Override protected URLConnection openConnection ( URL url ) throws IOException { url = new URL(url, url.toExternalForm(), getDefaultStreamHandler(url.getProtocol())); return new NtlmHttpURLConnection((HttpURLConnection) url.openConnection(), this.transportContext); }
Java - Registered: Sun Apr 21 00:10:10 GMT 2024 - Last Modified: Sun Jul 01 13:12:10 GMT 2018 - 6.9K bytes - Viewed (0) -
src/main/java/org/codelibs/curl/CurlRequest.java
task.run(); } } protected HttpURLConnection open(final URL u) throws IOException { final HttpURLConnection connection = (HttpURLConnection) (proxy != null ? u.openConnection(proxy) : u.openConnection()); if (sslSocketFactory != null && connection instanceof HttpsURLConnection) { ((HttpsURLConnection) connection).setSSLSocketFactory(sslSocketFactory); }
Java - Registered: Thu Apr 25 15:34:08 GMT 2024 - Last Modified: Sun Feb 12 12:21:25 GMT 2023 - 12.3K bytes - Viewed (0)